Skip to content

Instantly share code, notes, and snippets.

@jesseeproductions
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jesseeproductions/91751356639fe24bfd08 to your computer and use it in GitHub Desktop.
Save jesseeproductions/91751356639fe24bfd08 to your computer and use it in GitHub Desktop.
The Events Calendar 3.8 Filter the Page Title when a date is selected the event bar
/*
* The Events Calendar 3.8 Filter the Page Title when a date is selected the event bar
* @$title
*
*/
function filter_upcoming_events_title($title) {
if (tribe_is_list_view() || tribe_is_month()) {
if (strpos($title,'Events for') !== false && !tribe_is_past()) {
$title = "Upcoming Events";
} elseif (strpos($title,'Events for') !== false && tribe_is_past()) {
$title = "Past Events";
}
}
return $title;
}
add_filter('tribe_get_events_title', 'filter_upcoming_events_title', 10, 1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment