Last active
October 9, 2019 09:42
-
-
Save skyshab/52bfd22ef4bdb20bf08e2a658bc953b9 to your computer and use it in GitHub Desktop.
Customize the events month view title
This file contains 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 | |
add_filter('tribe_events_title', 'my_custom_events_title'); | |
function my_custom_events_title( $title ) { | |
$events_label_plural = tribe_get_event_label_plural(); | |
if ( tribe_is_month() ) { | |
$title = sprintf( | |
esc_html_x( '%1$s %2$s %3$s', 'month view', 'the-events-calendar' ), | |
$events_label_plural, | |
'for', | |
date_i18n( tribe_get_date_option( 'monthAndYearFormat', 'F Y' ), strtotime( tribe_get_month_view_date() ) ) | |
); | |
} | |
return $title; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment