Site icon Hip-Hop Website Design and Development

Tag title not being returned in web page title of tag archives

I’m utilizing the snippet under so as to add the class or tag title to their respective archive web page title. Whereas the class title is working as anticipated, the portion that’s supposed to focus on the tag archive pages (e.g. instance.com/occasions/tag/road-race/) just isn’t having any impact on these web page titles.

I attempted eradicating tribe_is_upcoming() && in order that it could solely require that the question is for the post_tag taxonomy, however that is not working both. I additionally tried specifying the post_tag conditional as is_tag(post_tag) and that does not have any impact.

I inspected the tag pages with the Question Monitor plugin and the next conditionals are true:
is_archive()
is_post_type_archive()
is_ssl()
is_tag()

The one distinction within the tag conditionals vs class conditionals is that the class pages have is_tax() as being true, whereas the tag pages have is_tag() as true.

Am I utilizing the fallacious operate (single_tag_title) or lacking one thing else with the conditionals?

operate filter_events_title( $title ) {
  // Single venues
  if ( tribe_is_venue() ) {
    //$title = 'Single venue web page';
    $title = sprintf('%1$s Operating Race Calendar', get_the_title() );
 );
  }
  // Record view class web page: upcoming occasions
  elseif ( tribe_is_upcoming() && is_tax(tribe_events_cat) ) {
    //$title = 'Class Operating Race Calendar';
    $title = sprintf('%1$s Race Calendar', single_cat_title( '', false ) );
  }
  // Record view class web page: previous occasions
  elseif ( tribe_is_past() && is_tax(tribe_events_cat) ) {
    $title = sprintf('%1$s Race Calendar', single_cat_title( '', false ) );
  }
  // Record view tag web page: upcoming occasions
  elseif ( tribe_is_upcoming() && is_tag() ) {
     $title = sprintf('%1$s Race Calendar', single_tag_title( '', false ) );
  }
  // Record view tag web page: previous occasions
  elseif ( tribe_is_past() && is_tag() ) {
    $title = sprintf('%1$s Race Calendar', single_tag_title( '', false ) );
  }
   
  return $title;
}
add_filter( 'tribe_events_title_tag', 'filter_events_title' );