When using the WPML Language Switcher block it shows both the current language as the available other language. How to hide the current language and only show the other available language?
Thank you for your quick reply. Unfortunately, this only works if you add the language switcher to a classical menu. I'm using the WPML Language Switcher block in Gutenberg and it shows both the current language as the other languages, despite in the settings unchecking the option "current language".
In this case, I suggest using the shortcode instead to display the language switcher.
- Add a Guttenberg shortcode block
- Add "[wpml_language_selector_widget]" in the block and update
- Go to WPML->languages->enable custom language switcher and then edit it
see my screennshot where you can see the block switcher vs the shortcode one
Thanks! I did as you instructed, however, I just want a simple plain link and the shortcode you gave me is adding some sort of box with different colors to my header. How do I just get a simple clickable "Nederlands" instead of the way it is being shown now?
Custom Code Notice: Please note that we do not provide custom solutions in the forum and the above CSS is provided at the supporter's discretion. Please always have a backup in place before using any custom code provided by our team.
The topic ‘[Closed] Hide current language’ is closed to new replies.
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.