Last active
August 29, 2015 13:58
-
-
Save ckpicker/9975332 to your computer and use it in GitHub Desktop.
Events Calendar 3.5.1 // Change title of Upcoming Events
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'; | |
} | |
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