Hey Pierre, thanks for the feedback!
I can’t disable TSF for events calendar, as then all of the pages are removed from the XML sitemap and I don’t want to do that.
Seems odd that TSF is making the Title Tag “untitled”, no?
I’ve dealt with Events Calendar support and although they are friendly, they usually don’t offer much in the way of custom code unless it’s already in their knowledgebase.
Here is the filter you’re talking about. It looks like maybe with the same code but specific to TSF, it could work?:
<?php
// Prevent Yoast from changing Event Title Tags for Event Views (Month, List, Etc,)
add_action( ‘pre_get_posts’, ‘tribe_remove_wpseo_title_rewrite’, 20 );
function tribe_remove_wpseo_title_rewrite() {
if ( class_exists( ‘Tribe__Events__Main’ ) && class_exists( ‘Tribe__Events__Pro__Main’ ) ) {
if( tribe_is_month() || tribe_is_upcoming() || tribe_is_past() || tribe_is_day() || tribe_is_map() || tribe_is_photo() || tribe_is_week() ) {
$wpseo_front = WPSEO_Frontend::get_instance();
remove_filter( ‘wp_title’, array( $wpseo_front, ‘title’ ), 15 );
remove_filter( ‘pre_get_document_title’, array( $wpseo_front, ‘title’ ), 15 );
}
} elseif ( class_exists( ‘Tribe__Events__Main’ ) && !class_exists( ‘Tribe__Events__Pro__Main’ ) ) {
if( tribe_is_month() || tribe_is_upcoming() || tribe_is_past() || tribe_is_day() ) {
$wpseo_front = WPSEO_Frontend::get_instance();
remove_filter( ‘wp_title’, array( $wpseo_front, ‘title’ ), 15 );
remove_filter( ‘pre_get_document_title’, array( $wpseo_front, ‘title’ ), 15 );
}
}
};