Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is trying to hide the language icon on their website when a page is not available in another language. They have attempted to find a CSS class to achieve this but were unsuccessful.
Solution:
We recommended setting up the language switcher instead of using a language icon. The language switcher can be configured as a List of languages with the 'Current language' option unchecked, which will prevent it from appearing on pages unavailable in other languages. Additionally, if the client is using Elementor, they can add WPML's Language Switcher using the guide at https://wpml.org/documentation/plugins-compatibility/elementor/adding-the-wpml-language-switcher-widget-to-elementor-templates-and-pages/. For further customization options, they can refer to our detailed guides on Language Switchers at https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/ and https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/custom-language-switcher/.

If this solution does not apply or is outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open a new support ticket at WPML support forum.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 3 replies, has 1 voice.

Last updated by Itamar 1 week, 6 days ago.

Assisted by: Itamar.

Author Posts
March 24, 2025 at 3:27 pm #16852702

Apa SEO

Contesto del problema:
I am trying to hide the language icon on my website when a page is not available in another language. I have read the documentation at hidden link and searched for a CSS class in the DOM to find a solution, but I found nothing.

Sintomi:
I cannot find a solution to hide the language icon when a page is not available in another language.

Domande:
How can I hide the language icon when a page is not available in another language?

March 24, 2025 at 7:55 pm #16853900

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

While one of my teammates handles your ticket, I will provide you with initial debugging steps.

I cannot suggest any CSS classes indicating a page is unavailable in another language.

What if you set up the language switcher instead of your language icon? You can set up the language switcher as a List of languages and uncheck the Current language. So, the language switcher will not appear if a page is unavailable in another language.

March 25, 2025 at 4:17 pm #16858975

Apa SEO

Thank you for your feedback, maybe I didn't understand what you mean, could you please explain again.
Attached you can find a screenshot of how we set up the languages.
Best regards.

Eleonora

setting-language.PNG
March 25, 2025 at 5:36 pm #16859303

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, Eleonora.

I'll continue to help you with this issue.

It seems you created a custom Language Switcher with Elementor. Please check the following guide on how to add WPML's Language Switcher with Elementor.

https://wpml.org/documentation/plugins-compatibility/elementor/adding-the-wpml-language-switcher-widget-to-elementor-templates-and-pages/

The option you show in your screenshot is the correct option - "Skip language".

You can get all the information in our following Language Switcher guide.

https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/

If you want to customize the language switcher further, please check out our guide on custom language switchers.

https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/custom-language-switcher/

If you have, I'd happily answer any further questions about the Language Switcher.

If you need further help with this issue, please share your site's Debug information. You can read about it here.

http://wpml.org/faq/provide-debug-information-faster-support/

Regards,
Itamar.