Skip to content

Instantly share code, notes, and snippets.

@jo-snips
Created November 27, 2012 14:12
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 jo-snips/4154410 to your computer and use it in GitHub Desktop.
Save jo-snips/4154410 to your computer and use it in GitHub Desktop.
Custom Theme Titles
add_filter(‘the_title’, ‘your_new_title’, 10);
function new_title($title, $id) {
global $post;
if( tribe_is_month() && !is_tax() ) { // The Main Calendar Page
$title = 'Events Calendar';
} elseif( tribe_is_month() && is_tax() ) { // Calendar Category Pages
$title = 'Events Calendar';
} elseif( tribe_is_event() && !tribe_is_day() && !is_single() ) { // The Main Events List
$title = 'Events List';
} elseif( tribe_is_event() && is_single() ) { // Single Events
$title = $title;
} elseif( tribe_is_day() ) { // Single Event Days
$title = $title;
} elseif( tribe_is_venue() ) { // Single Venues
$title = $title;
} else {
$title = $title;
}
return $title;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment