Make polylang NOT set language on certain page types
-
Is there a way to make polylang *not* set the language on certain templates?
In my case, I do not want the archive.php template to set the language. I have a bilingual site, but certain pages contain the content in BOTH languages at once (accomplished by using pll_ functions in those pages’ templates). So for instance, if a visitor visits a single post (single.php) that is in Hindi, that user’s language is now set as Hindi. Can I add some filter or command on my archive.php so that if that user subsequently visits the English version of a page generated from archive.php, it will *NOT* set him to English, but instead keep him in Hindi? The only time I want the language set is when the user clicks to a single post or page in a particular langauge.
- The topic ‘Make polylang NOT set language on certain page types’ is closed to new replies.