Hi
I’m using SEO Yoast and i would like to have following:
– url of event should have (SEO reasons) a venue and possible starting date
– there are some tags that we can use to create SEO title. What to use to show venue in Event Title (SEO)?
function wpseo_title_change( $string ) {
global $post;
//get the venues associated with this event.
$ven = $post->EE_Event->venues();
//loop through them (even though there is only one).
foreach ($ven as $venue) {
//add the venue name after the SEO title with a dash
$string = $string . ' - ' . $venue->name();
}
return $string;
}
add_filter( 'wpseo_title', 'wpseo_title_change', 10, 1 );
The above is just an example and should not be used on a production site. It will however be a good starting point for your own/your developers work.
Thank you for reply. I’ll stick to Venue in title .. should have come up with this idea by myself 🙂
Thank you
Viewing 2 reply threads
The support post ‘Venue and start date in URL – SEO’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.