Skip to content

Instantly share code, notes, and snippets.

@jo-snips
Created January 10, 2013 21:10
Show Gist options
  • Select an option

  • Save jo-snips/4505819 to your computer and use it in GitHub Desktop.

Select an option

Save jo-snips/4505819 to your computer and use it in GitHub Desktop.
This is a variation of custom event titles where the page title is defined by a variable.
if(isset($pagecustoms['zeitgeist_header_title'])) {
$htitle = $pagecustoms['zeitgeist_header_title'];
} elseif( tribe_is_month() && !is_tax() ) { // The Main Calendar Page
$htitle = 'Events Calendar';
} elseif( tribe_is_month() && is_tax() ) { // Calendar Category Pages
$htitle = 'Events Calendar: ' . tribe_meta_event_category_name();
} elseif( tribe_is_event() && !tribe_is_day() && !is_single() ) { // The Main Events List
$htitle = 'Events List';
} elseif( tribe_is_event() && !tribe_is_day() && !is_single() && is_tax() ) { // Category Events List
$htitle = 'Events List: ' . tribe_meta_event_category_name();
} elseif( tribe_is_event() && is_single() ) { // Single Events
$htitle=get_the_title();
} elseif( tribe_is_day() ) { // Single Event Days
$htitle= 'Events on: ' . date('F j, Y', strtotime($wp_query->query_vars['eventDate']));
} elseif( tribe_is_venue() ) { // Single Venues
$htitle=get_the_title();
} else {
$htitle=get_the_title();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment