Support

Home Forums Event Espresso Premium Change slug

Change slug

Posted: November 29, 2018 at 7:44 am


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.

You must be logged in to reply to this support post. Sign In or Register for an Account

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: publish

Updated by  Josh 1 week, 6 days ago ago

Topic Tags

Notifications

This topic is: not resolved
Do NOT follow this link or you will be banned from the site!