Skip to content

Instantly share code, notes, and snippets.

View demaier's full-sized avatar

Daniel Maier demaier

View GitHub Profile
@jo-snips
jo-snips / custom-wp-seo-titles.php
Last active October 10, 2015 15:18
The Events Calendar: Custom Titles w/WP SEO
<?php
add_filter('wpseo_title','my_custom_titles');
function my_custom_titles($title) {
if( tribe_is_month() && !is_tax() ) { // The Main Calendar Page
return 'Events Calendar';
} elseif( tribe_is_month() && is_tax() ) { // Calendar Category Pages
return 'Events Calendar' . ' &raquo; ' . single_term_title('', false);
} elseif( tribe_is_event() && !tribe_is_day() && !is_single() ) { // The Main Events List
return 'Events List';