Support

Home Forums Event Espresso Premium Remove or Change Slug in Event and People URLs

Remove or Change Slug in Event and People URLs

Posted: January 5, 2017 at 9:41 am


ardiaful

January 5, 2017 at 9:41 am

My URLs for events and people pages are:

1) Events, http://www.mysite.com/ee-event/title
2) People, http://www.mysite.com/people/name

I’d like to get rid of /ee-event and /people in URLs or, at least, to modify it. For events, I’ve tried with this code, but URL keeps the old slug:

add_filter( 'FHEE__EE_Register_CPTs__register_CPT__rewrite', 'my_custom_venue_slug', 10, 2 );
function my_custom_venue_slug( $slug, $post_type ) {
    if ( $post_type == 'espresso_event' ) {
        $custom_slug = array( 'slug' => 'evento' );
        return $custom_slug;
    }
    return $slug;
}


Josh

  • Support Staff

January 5, 2017 at 1:04 pm

The first issue is actually an issue caused by the Januas theme:
https://eventespresso.com/wiki/known-third-party-plugin-theme-conflicts/#januas_issue_2

For the people add-on slug:

https://gist.github.com/lorenzocaum/16cc1c184f82c9431fcf


ardiaful

January 5, 2017 at 5:11 pm

Thanks! both solutions work good for me.

The support post ‘Remove or Change Slug in Event and People URLs’ 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