Skip to content

Instantly share code, notes, and snippets.

@skyshab
Last active October 9, 2019 09:42
Show Gist options
  • Save skyshab/52bfd22ef4bdb20bf08e2a658bc953b9 to your computer and use it in GitHub Desktop.
Save skyshab/52bfd22ef4bdb20bf08e2a658bc953b9 to your computer and use it in GitHub Desktop.
Customize the events month view title
<?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