Skip to content Skip to sidebar

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

Problème :
Vous essayez de masquer un widget sur la version anglaise de votre site en utilisant le CSS :

:lang(en-US) selector { display: none; }

mais le widget reste visible. Cela fonctionne pour la version néerlandaise avec :lang(nl). De plus, lorsque vous ajoutez un ID personnalisé à un widget, celui-ci n'apparaît pas dans le code.
Solution :
Nous avons appliqué une solution via le personnalisateur en copiant simplement le sélecteur et en ajoutant le code de langue. Vous pouvez modifier cela dans le personnalisateur. Si cette solution ne fonctionne pas ou semble obsolète, ou si elle ne correspond pas à votre cas, nous vous recommandons de vérifier les problèmes connus, de vérifier la version de la correction permanente et de confirmer que vous avez installé les dernières versions des thèmes et plugins. Si le problème persiste, n'hésitez pas à ouvrir un nouveau ticket de support sur notre forum de support.

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 1 replies, has 0 voices.

Last updated by Lucas Vidal de Andrade 2 months, 3 weeks ago.

Assisted by: Lucas Vidal de Andrade.

Author Posts
November 17, 2025 at 10:53 am

robT-12

Contexte de la question:
I am trying to change a widget by hiding it on the en version of my website. I have placed the following css in the custom css of the widget; :lang(en-US) selector { display: none; } However, the widget is still visible. When I change it to :lang(nl) it works (my site was built in Dutch). When adding a custom id to a widget I do not see this widget in the code. The site I need help with is hidden link.

Symptômes:
The CSS to hide the widget on the en version of the site is not working, but it works for the nl version.

Questions:
Why is the CSS not hiding the widget on the en version of my site?
Why does the widget not appear in the code when I add a custom ID?

November 17, 2025 at 4:06 pm #17585067

Lucas Vidal de Andrade
WPML Supporter since 11/2023

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: Europe/Vienna (GMT+01:00)

Hey there,

I was able to apply the solution from the link I sent, via customizer. I simply copied the selector and added the language code. You can change it on the customizer.

Let me know if you have any other questions.

Customize_ The joy is in the journey _ Positive by Nature.jpeg