Site logo

Archived topic

Multi-language header logo redirects

7 replies · Started by Tomasz on September 11, 2018

Viewing posts 1–8 of 8

I have created a multi-language website based on Generate Press and Polylang. The problem I face right now is with setting the homepage logo so that it redirects in accordance with set (browser detected or chosen by the user) language. Currently, when I am on the Polish version and click on the logo I get redirected to the English version of the website, instead of being redirected straight to the Polish homepage.

Additional info:
- English is set as the main language and hidden
- Language detection is turned on.

Leo, thanks for the reply. I saw this reply before posting my question. This solution works fine in terms of logo redirections but causes unwanted change in the url structure. All the English content gets "/en" added because information is no longer hidden for default (English) language. My goal is to avoid that.

So I assume Tom's PHP snippet in the same thread didn't work either?

I tried this snippet (exactly as Tom had written it) but without success.

Hi there,

I just tried this out. Did you get it working? I went between languages and clicked the logo and the language didn't change.

Tom, not seeing much hope I turned off "English is set as the main language and hidden" and now main - English - language is visible in the url. This is not my preferred option but currently, I don't see any alternative. Apparently, it's a known issue with Polylang.

Have you checked with their support yet? They might have a solution.

This archived topic is closed to new replies.