Support

Home Forums Event Espresso Premium Change slug

Change slug

Posted: November 29, 2018 at 7:44 am

Viewing 1 reply thread


RedWolfCy

November 29, 2018 at 7:44 am

Hello,

As i understood, Event Espresso 4 is not supporting translation or any translation plugins.

Our website is multilingual (PolyLang).
domain.com -> Greek
domain.com/en/ -> English
domain.com/ru/ -> Russian

The events page url slug is by default domain.com/events
So it diverts the Events in Greek which is the primary language

How can we make in to be domain.com/en/events instead of domain.com/events ?

Since English is the most used language, we prefer to have it on the english domain instead of the Greek.

Thanks in advance


Josh

  • Support Staff

November 29, 2018 at 8:12 am

Hi,

You could try adding this code to a custom functions plugin:

add_filter(
  'FHEE__EE_Register_CPTs__register_CPT__rewrite', 
  'ee_custom_events_slug', 
  10, 
  2 
);
function ee_custom_events_slug( $slug, $post_type ) {
  if ( $post_type == 'espresso_events' ) {
    $custom_slug = array( 'slug' => 'en/events' );
    return $custom_slug;
  }
  return $slug;
}

Then, after activating the plugin, you go to the WordPress > Settings > Permalinks page, which will flush the site’s rewrite rules.

You can add the above code to a functions plugin.

Viewing 1 reply thread

The support post ‘Change slug’ 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