Posted: March 20, 2015 at 10:03 am
|
Hi Guys, I am using table view plugin and noticed that according to page language it changes the heading which would be fine. But it also changes the url of the event page from domain.com/Events/xxx to domain.com/Veranstaltungen/xxx and then the link does not work anymore cause the correct event url is /Events/. I would need to find the place in the files to change that. This is very important. Best Michael |
Hi Michael, I believe that is expected behavior. Is the site currently set to use the German language? If so, then events would be translated into the German language. Are you wanting to keep the slug as ‘events’? — |
|
|
Hi Lorenzo, the site is set to english. I am using wpml to translate some of the pages. On the english pages it is fine but on the german pages is points to /Veranstaltungen/. So somehow I need to change that both english and german use the slug /events/. Please check here to see for yourself. Best Michael |
Hi, we do not support WPML or qTranslate at this time. However, I do have an idea on overriding this. I’ll need a link to the specific page where this happens. Thanks — |
|
|
Hi Lorenzo, here is a link to the page. redacted – Event Espresso support team – LOC Best Michael |
Hi, this might work for replacing only those URLs: function ee_detect_and_replace_urls($url) { if ( preg_match("/de/i",$url) ) { $url = str_replace('https://www.autin.com/Veranstaltungen/', 'https://www.autin.com/events/', $url); return $url; } else { return $url; } } add_filter('the_content', 'ee_detect_and_replace_urls', 175); It is looking for pages that have /de/ in the slug and then it replaces one reference with another. Thanks — |
|
|
Hi Lorenzo thanks already for looking into this. Which function.php file should this be added to ? Best Michael |
Hi, try your theme’s functions.php file or a site specific plugin: https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/ Let us know if it works. Thanks — |
|
|
Hi Lorenzo, the code you provided worked 😀 Thank you very very much! Best Michael |
|
Marking as resolved. Should you need to carry on this discussion please create a new forum thread and link to this one. Thanks! |
The support post ‘Problem with German pages on the site!!!’ 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.