Skip to content

Instantly share code, notes, and snippets.

Created August 14, 2015 22:35
Show Gist options
  • Save anonymous/fa18a168e26670b4b1ce to your computer and use it in GitHub Desktop.
Save anonymous/fa18a168e26670b4b1ce to your computer and use it in GitHub Desktop.
<?php
/**
* Defines alternative titles for month view.
*
* @param string $title
* @return string
*/
function filter_events_title_month( $title ) {
if ( tribe_is_month() ) {
$title = 'Month view page';
}
return $title;
}
/**
* Modifes the event <title> element for month view.
*
* Users of Yoast's SEO plugin may wish to try replacing the below line with:
*
* add_filter('wpseo_title', 'filter_events_title_month' );
*/
add_filter( 'tribe_events_title_tag', 'filter_events_title_month' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment