Skip Navigation

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

Problem:
You are experiencing an issue where other languages disappear from the dropdown language menu on your site when the dropdown is selected, but they appear when it is set as a list.
Solution:
We recommend checking if this issue persists when using a default theme, as your current theme might be filtering out the dropdown items. If the dropdown works correctly with a default theme, consider using a different language switcher option. You might want to try a list with only flags (excluding the current language) or a floating language switcher. For more details on setting up different language switchers, visit this documentation.

If this solution does not apply because it is outdated or not suitable for your case, please open a new support ticket. We also 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. For further assistance, you can contact us directly 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 8 replies, has 2 voices.

Last updated by Andrey 2 months, 1 week ago.

Assisted by: Andrey.

Author Posts
September 3, 2024 at 8:37 pm #16137796

leoF-6

Background of the issue:
I am trying to use the dropdown language menu on my site hidden link. When the dropdown is selected, other languages disappear. If it is selected as a list, all languages are shown.

Symptoms:
Dropdown language menu not working as expected; other languages disappear when dropdown is selected.

Questions:
Why do other languages disappear when the dropdown is selected?
How can I ensure all languages are shown in the dropdown menu?

September 3, 2024 at 9:32 pm #16137976

Andrey
Supporter

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

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

Thank you for contacting WPML support.

It's possible that your current theme filters out the dropdown item, preventing the flag from showing. Have you checked if the issue still occurs when using a default theme?

If everything works fine with the default theme, you may want to consider using a language switcher option such as a list with only flags (excluding the current language) or perhaps the floating language switcher: https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/custom-language-switcher/#bonus-vertical-floating-language-switcher

September 4, 2024 at 5:52 am #16138366

leoF-6

I don't understand what you mean by fiilter out.
the html code is missing from dropdown menu, it is not a visibility css issue.
also i don't understand how can a theme make two elements of dynamic html disappear from code.. (and leaving intact just the first element)
the issue persist with other theme.

September 4, 2024 at 6:22 am #16138421

leoF-6

as you see from attached photo two <a> elements are missing from the code

Immagine 2024-09-04 082125.png
September 4, 2024 at 7:24 am #16138662

Andrey
Supporter

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

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

Thank you for your feedback.

I noticed that it is not a CSS issue.

Does the issue persist if you temporarily add such a language switcher to the other?

How did you add the language switcher to the menu?

Please test this also with only WPML plugins enabled.

Remember to back up your database before making any changes.

September 4, 2024 at 3:16 pm #16141672

leoF-6

i don't undestand "Does the issue persist if you temporarily add such a language switcher to the other"

i added dropdow in wmpl - > languages
(dropdown not working while language list is)
this indicates it cannot be a other incompatible plugin issue since if list is working the missing elements of the dropdown are completely connected to wmpl code.

Immagine 2024-09-04 171518.png
September 5, 2024 at 1:14 pm #16145199

Andrey
Supporter

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

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

I'm sorry. I made a mistake in a word in my previous message. Could you please check if you temporarily added such a language switcher to the footer?

this indicates it cannot be a other incompatible plugin issue since if list is working the missing elements of the dropdown are completely connected to wmpl code.

As I mentioned before, the current theme could contain a script that additionally filters the output of the menu items. While the non-dropdown menu items are unaffected, the dropdown ones have this problem. To ensure the problem is completely connected to the WPML code, please check the problem by temporarily switching the theme to any default one.

Let me know how it goes.

September 9, 2024 at 8:05 pm #16158740

leoF-6

I managed to put a shortcode on the menu and it works now...
still seems nonsense to me.. but thats'it...(inconsistency is total here)
consider resolved the issue

September 10, 2024 at 1:16 pm #16161682

Andrey
Supporter

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

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

Thank you for your update. I am glad to hear that it works now. Have a nice day.