Skip to content

Instantly share code, notes, and snippets.

@afragen
Created May 24, 2013 03:20
Show Gist options
  • Save afragen/5641080 to your computer and use it in GitHub Desktop.
Save afragen/5641080 to your computer and use it in GitHub Desktop.
Change the title 'Calendar of Events' to your custom title.
<?php
add_filter('tribe_get_events_title','my_custom_titles');
function my_custom_titles($title) {
if( tribe_is_month() && !is_tax() ) { // The Main Calendar Page
return 'JazzSchool Events';
} elseif( tribe_is_month() && is_tax() ) { // Calendar Category Pages
return 'JazzSchool Events' . ' &raquo; ' . single_term_title('', false);
} elseif( tribe_is_event() && !tribe_is_day() && !is_single() ) { // The Main Events List
return 'JazzSchool Events List';
} elseif( tribe_is_event() && is_single() ) { // Single Events
return get_the_title();
} elseif( tribe_is_day() ) { // Single Event Days
return 'JazzSchool Events on: ' . date('F j, Y', strtotime($wp_query->query_vars['eventDate']));
} elseif( tribe_is_venue() ) { // Single Venues
return $title;
} else {
return $title;
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment