This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'wp_footer', 'options_add_javascript' ); | |
function options_add_javascript() { | |
?> | |
<script type="text/javascript"> | |
//Add Class to Option 1 | |
jQuery('dd.tribe-meta-value:contains("Option 1")').addClass('option-1'); | |
//Add Class to Option 2 | |
jQuery('dd.tribe-meta-value:contains("Option 2")').addClass('option-2'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'tribe_event_meta_event_date', 'remove_end_time' ); | |
function remove_end_time( $html ) { | |
$date_pieces = explode(' - ', $html); | |
$html = $date_pieces[0] . '</abbr></dd>'; | |
return $html; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('body_class', 'event_category_body_classes'); | |
function event_category_body_classes($classes) { | |
if ( tribe_is_event() && is_single() ) { | |
//Query event categories | |
$event_categories = wp_get_post_terms( get_the_ID(), 'tribe_events_cat' ); | |
if( !empty( $event_categories ) ) { | |
foreach( $event_categories as $single_category ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'tribe_event_pro_meta_venue_name', 'hide_unnamed_venues_from_meta' ); | |
function hide_unnamed_venues_from_meta( $html ) { | |
if ( false !== strpos( $html, 'Unnamed Venue' ) ) return ''; | |
return $html; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'wp_head', 'community_add_css' ); | |
function community_add_css() { | |
if (tribe_is_community_edit_event_page() || tribe_is_community_my_events_page()) { | |
?> | |
<style> | |
#sidebar #feature-posts {display:none !important;} | |
</style> | |
<?php | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Look here for further documentation: http://tri.be/support/documentation/events-calendar-themers-guide/#responsivetemplates | |
add_filter( 'tribe_events_kill_responsive', '__return_true'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// See the codex to learn more about WP text domains: | |
// http://codex.wordpress.org/Translating_WordPress#Localization_Technology | |
// Example Tribe domains: 'tribe-events-calendar', 'tribe-events-calendar-pro'... | |
add_filter('gettext', 'theme_filter_text', 10, 3); | |
function theme_filter_text( $translations, $text, $domain ) { | |
// Copy and modify the following if {} statement to replace multiple blocks of text | |
// Match the text you want you want to translate, preferably also match the text domain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$additional_values = array(); | |
$additional_values['organizer'] = tribe_get_organizer($event_id); | |
?> | |
<div id="tribe-events-event-<?php echo $event_id ?>" class="<?php tribe_events_event_classes() ?>" data-tribejson='<?php echo tribe_events_template_data( $post, $additional_values ); ?>'> | |
<h3 class="tribe-events-month-event-title summary"><a href="<?php tribe_event_link( $post ); ?>" class="url"><?php the_title() ?></a></h3> | |
</div><!-- #tribe-events-event-# --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This function adds javascript to the <head> declaration of your site | |
//NOTE: This is only compatible with version 3.4 | |
add_action( 'wp_head', 'modify_week_view'); | |
function modify_week_view() { | |
?> | |
<script type="text/javascript"> | |
jQuery(document).ready(function ($) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Runs the <title> element through our custom filter | |
add_filter('wp_title', 'filter_events_title'); | |
// Runs the Page title element through our custom filter | |
add_filter('tribe_get_events_title', 'filter_events_title'); | |
// Tribe events: Manually set title for each page | |
function filter_events_title ($title) { | |
if ( tribe_is_upcoming() && !is_tax() ) { // List View Page: Upcoming Events | |
$title = 'List view: Upcoming events page'; |