Meta titles with Yoast Plugin

Home Forums Calendar Products Events Calendar PRO Meta titles with Yoast Plugin

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1347430
    Graham Thomas
    Participant

    I have read many of the posts on this topic but still have not found a definitive answer. I understand that the Events Calendar Pro has some issues with the Yoast SEO plugin. However, I would like to gain control of the meta titles, especially for the events main/landing page, and event category pages.

    First both the main page and category titles were “Events Archive …. “, so I found the following page which suggested adding a code snippet to my themes functions.php: https://theeventscalendar.com/knowledgebase/titles-in-yoast-seo/

    However, now instead of “Events Archive .. “, I have “Upcoming Events … ” which is not much of an improvement. Is there a way I can gain control of the meta tags for these pages?

    Thanks!

    #1348269
    Barry
    Member

    Hi Graham,

    Though that might not be the improvement you’re looking for, it at least suggests the snippet is operating as expected (in other words, it is stopping Yoast’s plugin from interfering with the titles that our own plugin attempts to set) 🙂

    With that in place, you can make further adjustments with some additional code along these lines:

    add_filter( 'tribe_events_title_tag', function( $default_title ) {
    	if ( ! tribe_is_month() ) {
    		return $default_title;
    	}
    
    	return 'MONTH VIEW CUSTOM TITLE!';
    } );
    

    This could be added either to a custom plugin (preferred) or else to your theme’s functions.php file.

    Naturally, you might want to tweak it to get the actual result you are looking for. In my example it only targets month view, but you could of course expand it to modify the title tag for all event views, or to add different text in different situations.

    We’re limited in terms of supporting customizations of this sort, but I hope this at least gives you a starting point you can build on 🙂

    #1348362
    Graham Thomas
    Participant

    I think that is fine for me to get on with. Thanks very much.

    #1348614
    Barry
    Member

    Excellent 🙂

    #1359678
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Meta titles with Yoast Plugin’ is closed to new replies.