Support

Home Forums Event Espresso Premium EE category Slugs in URL

EE category Slugs in URL

Posted: May 29, 2018 at 12:48 am


Jarred

May 29, 2018 at 12:48 am

Hey guys, how do I make my EE Categories Slug Show in the URL of the Events? I have had over 8 Event Espresso categories that I have used for last 3 years. But all of my events urls are always just like this

example.com/events/fun-summer-class

instead of what I think would be better for SEO

example.com/summer-camps/fun-summer-class

Thanks in advance for a good explanation showing the following

1. How to make this happen
2. How to make sure it doesn’t affect SEO
3. Make sure its a permalink structure that works with Mobile EE App.

Thanks guys.


Jarred

May 29, 2018 at 12:54 am

And please, I need to make sure for SEO purposes that my “PAGES” still show up as example.com/pagename

As far as posts or custom events. That part doesn’t matter much because I only have one blog post in 3 years. The rest are all just event espresso events and they all just say example.com/events/postname

My current permalink structure is /%category%/%postname%/


Josh

  • Support Staff

May 29, 2018 at 4:26 pm

Hi Jarred,

I can share some example PHP code with you that makes this happen:

https://gist.github.com/joshfeck/59695d72a11288d7246eb05c01a8e63b

You can add the above to a functions plugin.

What the code will do is change the event URL if there’s an event category.

How to make sure it doesn’t affect SEO

I think this change will affect SEO because it is a change to your site’s event URLs.

Make sure its a permalink structure that works with Mobile EE App

Just about any valid permalink striation will work with the mobile EE app. The exception being the default permalink option.


Jarred

May 31, 2018 at 1:10 am

Thanks for that code.

But, is there a different answer assuming every single event will be tied to an EE category? Becuase all of my events have a category.

And since it will affect SEO and I will be using Yoast SEO plugin need to make sure any option works with that.

If the PHP is the best option in your opinion then that’s cool. But since you now know that every event I ever create will indeed be tied to an Event Espresso Category, I wonder if there is a better way to ensure good SEO structure and work with Yoast SEO.

If none of that makes sense, forgive me, I’m typing questions not knowing the answers 🙂


Josh

  • Support Staff

May 31, 2018 at 8:59 am

But, is there a different answer assuming every single event will be tied to an EE category? Becuase all of my events have a category.

Then every single one of the event URLs will change to include the category slug, because every single event will be related to an EE category.

And since it will affect SEO and I will be using Yoast SEO plugin need to make sure any option works with that.

I don’t believe the Yoast SEO plugin has an option to change the actual URL of the post, so you should be OK there.

If the PHP is the best option in your opinion then that’s cool. But since you now know that every event I ever create will indeed be tied to an Event Espresso Category, I wonder if there is a better way to ensure good SEO structure and work with Yoast SEO.

PHP is the best option by default because it’s also the only option. This is because there isn’t a feature within the User Interface to change the event URLs so they include a category slug.

The support post ‘EE category Slugs in URL’ 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