I want to hide the switcher if a page only has one language, which in our case is English.
Most of the articles in our blog are in English, and just a few posts are translated. We want to hide the switcher (widget) when no other language is available besides English.
This article below, for example, is only in English. So, no need to have the language switcher as no other flag (language) will be avialble to switch the page to.
hidden link
This is our blog where we use WPML: hidden link
How can the switcher disappear when only the default language (English in this case) is available?
Thank you for getting in touch. Achieving this might require custom CSS coding. Could you please provide a link to a post that has been translated into multiple languages? This will allow me to assess if your requirements can be met without intricate customization.
2. Alternatively, you can hide the language switcher if it's not translated using the provided custom CSS code. Simply insert the following CSS code into WP > Appearance > Customize > Additional CSS:
DISCLAIMER: Please know that any snippet or code suggested here is for educational purposes only. they are not meant to be the final solution but instead meant to point you in the right direction and are out of the scope of our support so we can't nor will modify, improve, debug or maintain it.
The topic ‘[Closed] Hide switcher if only one language is available’ is closed to new replies.