Map Page Title Change SEO

Home Forums Calendar Products Events Calendar PRO Map Page Title Change SEO

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1188363
    dcantato
    Participant

    I previously opened a request about this but got busy and was unable to completely follow through. I am trying to change the title for this page:
    http://obstacleracingmedia.com/race-calendar/

    When the page loads it first shows: “Upcoming Events”, then it does a refresh or something that causes it to change to “Upcoming Events – Events – Obstacle Racing Media”

    What I have tried from previous suggestions:
    I added this to my functions.php file –

    add_filter('wp_title', 'filter_events_title');
    function filter_events_title ($title) {
    	if ( tribe_is_map() && !is_tax() ) { // Map View Page
    		$title = 'The Best Obstacle Course Racing Calendar ';
    	}
    	elseif ( tribe_is_map() && is_tax() ) { // Map View Category Page
    		$title = 'The Best Obstacle Course Racing Calendar ';
    	}
    };

    I’ve done the above with wp_title as well as wpseo_title

    I have also added this tweak/plugin in hopes of changing it:
    https://gist.github.com/geoffgraham/7116b0856a75082c46a9891402b9da8a

    Currently it seems like none of these things have had an impact. What should I try next?

    I’m also trying to change the meta description for this page so that it appears better on google. Is this – wpseo_metadesc – the correct hook to hop onto? I’m using yoast as you can likely tell from the hooks I’m trying to use. Any help here would be appreciated. Thanks

    #1188885
    Nico
    Member

    Hi there @dcantato,

    Thanks for getting in touch with us! Interesting request here, let’s jump into it 🙂

    After a couple of test I could get it to work with the following snippet:

    /* Change photo view title */
    function tribe_filter_calendar_title ( $title ) {

    /* bail if not phot view */
    if ( !tribe_is_map() ) return $title;

    return 'The Best Obstacle Course Racing Calendar ';
    }
    add_filter('wpseo_title', 'tribe_filter_calendar_title' );
    add_filter( 'tribe_events_title_tag', 'tribe_filter_calendar_title' );

    That will alter the Yoast title (shows right when the page loads, might not be necessary for you) and the title that map views uses after the ajax load of events.

    Please give this a try and let me know if it works as expected,
    Best,
    Nico

    #1189090
    dcantato
    Participant

    I got it working by adding two things

    add_filter( 'tribe_events_title_tag', 'filter_events_title' );
    add_filter('wpseo_title', 'filter_events_title');
    function filter_events_title ($title) {
    	if ( tribe_is_map() && !is_tax() ) { // Map View Page
    		$title = 'The Best Obstacle Course Racing Calendar ';
    	}
    	elseif ( tribe_is_map() && is_tax() ) { // Map View Category Page
    		$title = 'The Best Obstacle Course Racing Calendar ';
    	}
    
    	return $title;
    };
    

    I didn’t have a return for the $title which instantly made it work, a serious duh moment.

    But the second thing I saw you add was the other filter. Is that filter the title for when the page does that little reload it tends to do? What is that hooking into – tribe_events_title_tag?

    Is there another hook for the meta description tag?

    #1189412
    Nico
    Member

    Thanks for confirming @dcantato! Good catch I missed that your snippet was lacking a return 🙂

    Is that filter the title for when the page does that little reload it tends to do? What is that hooking into – tribe_events_title_tag?

    Yeap, it’s a general filter for when the calendar updates the title. And yes it’s hooking to tribe_events_title_tag.

    Is there another hook for the meta description tag?

    Not sure about that, but I’m mostly sure the calendar is changing that. My guess is you might need to hook into a Yoast filter for this. Do you think the description tag is being changed by our plugin?

    Please let me know about this,
    Best,
    Nico

    #1199780
    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 ‘Map Page Title Change SEO’ is closed to new replies.