Support

Home Forums Event Espresso Premium Canonical URL in Event

Canonical URL in Event

Posted: September 5, 2016 at 4:32 am


giropa832

September 5, 2016 at 4:32 am

Hi,

I have searched a solution for this question without finding any, despite my efforts.

I need to add a rel=”canonical” tag to my events, so I can tell search engines which version of my content is accurate. With Yoast SEO I can do it within Posts and Pages, but not on events.

How could I do that


Josh

  • Support Staff

September 5, 2016 at 3:42 pm

You can use the Yoast SEO Advanced editor to add Canonical URLs to events. You’ll add the code snippet from our library to your site to make sure the Yoast SEO editor loads onto the events page:

https://github.com/eventespresso/ee-code-snippet-library/blob/master/third-party-integration/tw_ee_load_yoast_seo_within_ee.php

You can add the above to a functions plugin or into your WordPress theme’s functions.php file.


giropa832

September 7, 2016 at 5:17 pm

Hi,

Thanks for the answer. I’ve tried the snippet and unfortunately does not work. I’ve been trying random changes with no luck. Is the snippet supposed to be working?

Best,


Josh

  • Support Staff

September 7, 2016 at 6:05 pm

Yes the snippet is verified to work with versions 3.4.2 and 3.5 of the Yoast SEO plugin.

With the unaltered snippet in place, can you go to the Yoast SEO Titles and Metas page and scroll past where it has Posts and Pages, to where it says Events, then click “Show” under Yoast SEO Meta Box?


giropa832

September 8, 2016 at 5:03 am

It was already on “Show”. Wondering if it might be the filter, I modified the yoast seo plugin directly to always show metaboxes and it works. It’s the logic here that won’t work, and I don’t know how to move forward.

Maybe is my limited knowledge and am doing something wrong here…


Josh

  • Support Staff

September 8, 2016 at 5:48 am

Are you using a later version of the Yoast plugin? Also, this might make a difference: Did you add the filter function to your theme’s functions.php file, or was it added to a site specific plugin?

The support post ‘Canonical URL in Event’ 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.

Event Espresso