Polylang - Fix for homepage not switching language / translation
-
This took me multiple hours to figure out because the solution polylang provides by itself doesn't work here or with Lay Theme:
If you have the problem that your homepage doesn't switch the language but all other pages work. Like, German is your main language and English your second language, the switch always shows the German translation – unimportant what you do:
Do NOT set the homepage under the ‘Reading settings’ panel.
Leave it as is and set your Lay Theme homepage via the usual way in the Customize panel.
Then it works!
PS: It also works with any page being selected in the ‘Reading settings’ – just don't select the actual homepage. The Lay Theme setting overrules that setting anyways, but if you set both ways with the same page, it breaks polylang for the homepage.
-
oh damn!
thanks for the heads up, i will try and fix this
-
WONDERFUL!!! Thank you for posting this, I had the same issue and it worked <3
-
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it