Forum Replies Created
-
AuthorPosts
-
Jonah
ParticipantHi Mike, take a look at this: https://theeventscalendar.com/support/forums/topic/modifying-tribe_meta_event_cats-output/
You might also try just using the get_terms() functions on it’s own, querying for the tribe_events_cat taxonomy which is how categories are stored.
I hope that helps,
JonahJanuary 22, 2012 at 6:32 pm in reply to: Displaying Custom Field Attributes on Frontend in Custom Template File #13807Jonah
ParticipantHi Janet,
There is no function named get_tribe_custom(), it was decided to stick with naming convention and go with tribe_the_custom_fields() instead. If you just want to pull in the value of a field just use:
$custom_field = tribe_the_custom_fields('FieldLabel');
And then you can do what you want with $custom_field which will contain the value of your field. Does that help?
Jonah
ParticipantYou’re welcome Robert, glad you figured it out!
Jonah
ParticipantHey Suzanne,
Nevermind the above code. This is actually just a simple CSS conflict. You have in your themes CSS:
.post {
max-width: 900px;
margin: 0 0 0 22px;
}
Which controls the width and margin for the right hand column. In the events CSS we use:
.events-archive .hentry {
margin: 0;
padding: 0 0 15px 0 !important;
}
And because of specificity rules, by using two classes in the CSS declaration, this trumps your theme styling and sets a 0 margin on the right column div. Two things you could try here…
1. Use a higher specificity for your .post styling by adding an ID selector like so:
#main .post {
max-width: 900px;
margin: 0 0 0 22px;
}
That will trump the events.css styling.
2. Modify the events.css file (make a duplicate copy in an ‘events’ folder in your theme and set the appropriate margin for .events-archive .hentry
I hope that helps.
Jonah
ParticipantGood to hear!
Jonah
ParticipantThe first line of code got filtered, here’s the full command: http://pastebin.com/LMn3sC7k
Jonah
ParticipantHi Giornale, yeah essentially what you’ll want to do is override those widgets by copying the widget files located in wp-content/plugins/the-events-calendar/views or wp-content/plugins/events-calendar-pro/views (for PRO widgets) and place them in the ‘events’ folder in your theme. Then, instead of using the_content() to pull in the events text content you’ll want to use a custom function where you can automatically control the excerpt. I actually use a combination of functions but first copy the following code into your functions.php file: http://pastebin.com/PMf0vKQk
Then I execute a custom truncating command like so:
echo restoreTags(trunc(strip_tags(get_the_content(), ''),18));
You can optionally remove the strip_tags and restoreTags functions but I find them helpful to normalize my excerpts. If you just wanted to use the trunc function do this:
echo trunc(get_the_content(),18);
That should get you pointed in the right direction but let me know if you have any other questions.
Jonah
ParticipantAlright guys, I’ve posted a few more custom loop example so take a look: https://theeventscalendar.com/support/documentation/the-events-calendar-template-tags-general-functions/#functiontribe_get_events
Jonah
ParticipantHi Giornale, no it will only affect your single events.
January 19, 2012 at 1:01 pm in reply to: Removing one category of events from main event list and calendar. #13649Jonah
ParticipantHi Seth, this is doable but it’s going to require a fair amount of template edits.
First make copies of wp-content/plugins/the-events-calendar/views/table.php and wp-content/plugins/the-events-calendar/views/list.php and place them into an ‘events’ folder in your them.
For table.php find line 20 that currently has:
$eventPosts = tribe_get_events(array( 'eventDisplay'=>'month' ));
…and modify that to:
$eventPosts = tribe_get_events(array(
'eventDisplay'=>'month',
'tax_query'=>array(
array(
'taxonomy' => 'tribe_events_cat',
'field' => 'id',
'terms' => 4,
'operator' => 'NOT IN'
)
)
));
Replacing ‘4’ with the ID of your events category you want to exclude. Just browse your events categories in the admin and hover over their name to get the tag_ID.
For the list, open up list.php and before the line that reads:
if (have_posts()) :
Copy and paste the following: http://pastebin.com/PPLCicug
That should do it!
January 19, 2012 at 12:38 pm in reply to: Is it possible to show the featured image as a background in the calendar grid? #13647Jonah
ParticipantHi Ashley, yeah this should be possible but it’s going to be a little tricky and we can’t provide a full solution. One way you could do it is modify the gridview.php template file to pull in the featured image and I would use TimThumb to dynamically handle the image resizing and then throw that into an image tag or other element that you can then target via CSS to handle the z-indexing and other styling… I hope that helps!
Jonah
ParticipantThis is totally unsupported but what I would suggest is using the Advanced Custom Fields plugin (http://plugins.elliotcondon.com/advanced-custom-fields/). You’ll have to still enter all your Venue’s beforehand, but then you can create a custom relationship field with ACF that’s assigned to only the events post type (will only show up for events) and set the relationship field to pull from tribe_venues to be able to select any of your venues for an event. Then you’ll need to modify the events templates to pull in that custom field data. That’s how I would do it…
Jonah
ParticipantHi Giornale, the reason the larger image is showing in this event is because you have a featured image set for the event in addition to the manual thumbnail inside the event content. The plugins single.php by default will show the featured thumbnail if it exists at the top of the event. You can either remove the featured image from the event itself or remove the featured image code in the wp-content/plugins/the-events-calendar/views/single.php file (first make a copy of this and place it in an ‘events’ folder within your theme to customize).
Does that help?
Jonah
ParticipantHi Simon, did you at one point upgrade from a much older version of the plugin? Can you also send me FTP access? Do I have permission to modify some things? I’ll put everything back exactly how it was…
Jonah
ParticipantHi guys, I’ve got a few examples in my bag of tricks and will get these up today and post back here when they’re ready.
-
AuthorPosts
