lisaleague
11/18/2014 - 11:54 AM

From http://pastebin.com/QU2aMwBJFix Modern Tribe Events Calendar title bug

From http://pastebin.com/QU2aMwBJFix Modern Tribe Events Calendar title bug

// Runs the <title> element through our custom filter
add_filter('tribe_events_title_tag', 'filter_events_title');
// If you are using certain versions of Yoast you might try deleting the above line and uncommenting the following one
// add_filter('wpseo_title', 'filter_events_title');

// Tribe events: Manually set title for each page
function filter_events_title ($title) {

	if ( tribe_is_event() && is_single() ) { // Single Events
		$title = 'Single event page';
	}
	elseif ( tribe_is_venue() ) { // Single Venues
		$title = 'Venue page';
	}
	elseif (tribe_is_organizer() && is_single() ) { // Single Organizers
		$title = 'Organizer page';
	}
	elseif ( tribe_is_month() && !is_tax() ) {  // Month View Page
		$title = 'Month view page';
	}
	elseif ( tribe_is_month() && is_tax() ) { // Month View Category Page
		$title = 'Month view category page';
	}
	elseif ( 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';
	}
	elseif ( tribe_is_past() && !is_tax() ) { // List View Page: Past Events
		$title = 'List view: Past events page';
	}
	elseif ( tribe_is_past() && is_tax() ) { // List View Category Page: Past Events
		$title = 'List view Category: Past events page';
	}
	elseif ( tribe_is_week() && !is_tax() ) { // Week View Page
		$title = 'Week view page';
	}
	elseif ( tribe_is_week() && is_tax() ) { // Week View Category Page
		$title = 'Week view category page';
	}
	elseif ( tribe_is_day() && !is_tax() ) { // Day View Page
		$title = 'Day view page';
	}
	elseif ( tribe_is_day() && is_tax() ) { // Day View Category Page
		$title = 'Day view category page';
	}
	elseif ( tribe_is_map() && !is_tax() ) { // Map View Page
		$title = 'Map view page';
	}
	elseif ( tribe_is_map() && is_tax() ) { // Map View Category Page
		$title = 'Map view category page';
	}
	elseif ( tribe_is_photo() && !is_tax() ) { // Photo View Page
		$title = 'Photo view page';
	}
	elseif ( tribe_is_photo() && is_tax() ) { // Photo View Category Page
		$title = 'Photo view category page';
	}

	return $title;
}