Skip to content

Instantly share code, notes, and snippets.

@ckpicker
Last active August 29, 2015 13:58
Show Gist options
  • Save ckpicker/9975332 to your computer and use it in GitHub Desktop.
Save ckpicker/9975332 to your computer and use it in GitHub Desktop.
Events Calendar 3.5.1 // Change title of Upcoming Events
// 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';
}
elseif ( tribe_is_upcoming() && is_tax() ) { // List View Category Page: Upcoming Events
$title = 'List view Category: Upcoming events page';
}
return $title;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment