Last active
August 29, 2015 14:07
-
-
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
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
/* | |
* 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