Support

Home Forums Event Espresso Premium Problem with German pages on the site!!!

Problem with German pages on the site!!!

Posted: March 20, 2015 at 10:03 am


mautin

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


Lorenzo Orlando Caum

  • Support Staff

March 20, 2015 at 10:38 am

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’?


Lorenzo


mautin

March 20, 2015 at 11:32 am

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


Lorenzo Orlando Caum

  • Support Staff

March 20, 2015 at 11:55 am

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


Lorenzo


mautin

March 20, 2015 at 1:26 pm

Hi Lorenzo, here is a link to the page. redacted – Event Espresso support team – LOC
Pleas consider that there might be more than one page in german where this issue would occur.

Best Michael


Lorenzo Orlando Caum

  • Support Staff

March 20, 2015 at 3:20 pm

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


Lorenzo


mautin

March 20, 2015 at 3:26 pm

Hi Lorenzo thanks already for looking into this. Which function.php file should this be added to ?

Best Michael


Lorenzo Orlando Caum

  • Support Staff

March 20, 2015 at 4:09 pm

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


Lorenzo


mautin

March 22, 2015 at 2:33 am

Hi Lorenzo, the code you provided worked 😀

Thank you very very much!

Best Michael


Dean

March 23, 2015 at 3:53 am

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.

Event Espresso