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
November 29, 2018 at 8:12 am
Add New Note to this Reply
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 .