Yoast SEO conflict?

Home Forums Calendar Products Events Calendar PRO Yoast SEO conflict?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #933002
    jewschool
    Participant

    Hi,

    I’m using the WordPress SEO by Yoast plugin on my site. The theme that I use implements Yoast but also requires that you use the “Force Rewrite of Titles” option. My titles seem to work fine on single events, but on the main event index page, the title comes up blank.

    In my HTML, it appears as:

    <title></title>

    Any idea how I can resolve this?

    Thanks.

    #933297
    Barry
    Member

    Hi Benjamin,

    It’s hard to guide you exactly since there’s no way to know how your theme works under the hood, but potentially a snippet like this will fix things by detecting if the title is an empty string (and checking to see if it is an event-related request) and replacing it with something else:

    add_filter( 'wp_title', 'events_title_fix', 1000 );
    
    function events_title_fix( $title ) {
    	$trimmed_title = trim( $title );
    	if ( ! empty( $trimmed_title ) || ! tribe_is_event_query() ) return $title;
    	return 'Main events page!';
    }

    You could for instance try adding that to your theme’s functions.php file.

    Does that help at all?

    #938789
    Barry
    Member

    Hi! It’s been a while so I’m going to go ahead and close this thread. If we can help with anything else, though, please don’t hesitate to create new threads as needed. Thanks!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Yoast SEO conflict?’ is closed to new replies.