-
-
Save theeventscalendar/c7d6f02a85cf25f45e91 to your computer and use it in GitHub Desktop.
Change the title for the Month View page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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