Skip Navigation

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

Problem:
The client needed to hide the Italian language switcher on the shop home page of their bilingual site, even though they had already hidden it on other shop-related pages following the WPML documentation.
Solution:
We recommended adding the following CSS code to the custom CSS section of their theme to specifically target and hide the Italian language switcher on the shop home page:

.post-type-archive.woocommerce-shop .menu-item.wpml-ls-item-it {<br />    display: none !important;<br />}

This code ensures that the Italian language switcher does not appear on the shop home page.

If this solution does not resolve your issue, or if it seems outdated or irrelevant to your case, 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. Should you need further assistance, please do not hesitate to 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.

Tagged: 

This topic contains 3 replies, has 0 voices.

Last updated by simoneF-17 1 month, 3 weeks ago.

Assisted by: Noman.

Author Posts
May 15, 2025 at 1:52 pm #17037181

simoneF-17

Background of the issue:
I have hidden the language switcher on our shop page hidden link because our site is in 2 languages but the shop is only in English. I have followed instructions in this post of your documentation: https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/how-to-display-or-hide-the-language-switcher-on-specific-pages/.

Symptoms:
But, on the shop home page, Italian language still appears. On the contrary if I enter a single category or a product, it properly disappears.

Questions:
How can I ensure the language switcher does not show on the shop home page? It would make more sense.
See attached screenshots. Thank you

May 15, 2025 at 3:55 pm #17037984

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting WPML Support. To hide the Italian language flag from shop page, could you please try to add the below CSS in the custom CSS section of the theme:

.post-type-archive.woocommerce-shop .menu-item.wpml-ls-item-it {
	display: none !important;
}

And it will look as in the attached screenshot.

Kindly let me know the results,
Thank you

hide italian flag from switcher.jpg
May 15, 2025 at 6:29 pm #17038433

simoneF-17

Thank you, it has worked!

I need not to showing also "checkout page", could you please tell me how should be the full html to add from "Customize" area?

Now it's this:

/*Hide Language Switcher only on the page shop

/*Menu Language Switcher*/
body.shop .wpml-ls-menu-item {
visibility: hidden !important;
}
.post-type-archive.woocommerce-shop .menu-item.wpml-ls-item-it {
display: none !important;
}

How shall I write to make disappear the language switcher also from the checkout?

THANK YOU SO MUCH! 🙂

May 15, 2025 at 8:05 pm #17038682

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Glad to hear it worked 🙂

I tried to visit the checkout page of your site but it shows a coming soon page as you can see in the attached screenshot. However, WooCommerce adds "woocommerce-checkout" class to the checkout page. So, please try to use the below CSS:


/*Menu Language Switcher*/
body.shop .wpml-ls-menu-item {
visibility: hidden !important;
}

/*Hide Menu Language Switcher from Shop and Checkout page*/
.post-type-archive.woocommerce-shop .menu-item.wpml-ls-item-it,
.woocommerce-checkout .menu-item.wpml-ls-item-it {
display: none !important;
}

And see if this resolves the issue.

Thank you

coming soon.jpg
May 15, 2025 at 8:24 pm #17038732

simoneF-17

Sorry, shop is under maintenance.
I keep it like before, I see it's ok because now I see that checkout page appears as translated automatically.
Thank you so much for your kind help!