Skip to content Skip to sidebar

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

Problem:
The client is experiencing an issue where the WPML language switcher only appears on the homepage and not on other pages of their WordPress site. Despite using a shortcode to implement the language switcher, it fails to appear on pages other than the homepage. Additionally, the language switcher dropdown is not functioning on the Russian page, showing an empty div.

Solution:
We recommend the following steps to troubleshoot and resolve the issue:
1. Navigate to WPML -> Languages -> Footer language switcher, activate the language switcher in the footer, and save the changes.
2. Visit the site on the frontend and check the pages where the language switcher is not appearing to see if the footer language switcher is functioning correctly.
3. Ensure that the homepage is translated into all languages, verify that these translations are published, and confirm that the secondary languages are not hidden.

If these steps do not resolve the issue or if the solution seems outdated or irrelevant to your specific case, we highly recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket.

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 Carlos Rojas 1 month ago.

Assisted by: Carlos Rojas.

Author Posts
September 10, 2025 at 12:45 pm #17390752

avivk-2

Background of the issue:
I am trying to add a WPML language switcher to my WordPress site. The language switcher appears only on the homepage and works well on posts, but it does not appear on other pages. I am using a shortcode in my theme: <div class="wpml-lang"> <?php do_action('wpml_add_language_selector'); ?> </div>. I have checked the documentation on adding language switchers using PHP and shortcodes, how to add a language switcher to your WordPress site, and custom language switchers.

Symptoms:
The WPML language switcher appears only on the homepage and does not appear on other pages. On the Russian page hidden link, the language switcher dropdown is not working. Inspecting the page shows an empty div.

Note : On the home page, I’m using a custom template that does not rely on any ACF field conditions. On other pages, I’m using a custom template, where the template is selected based on the value of an ACF field.

Questions:
Why is the WPML language switcher dropdown not appearing on pages other than the homepage?

September 10, 2025 at 1:09 pm #17390896

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

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

Hello,
Thank you for contacting us

Please follow these steps to double-check if the issue is with the language switcher of the implementation:
- go to WPML -> Languages -> Footer language switcher -> Activate the language switcher in the footer -> Save the changes
- Visit the site on the frontend -> Go to the pages where the language switcher is not working correctly and check if the language switcher in the footer is working or not

Can you tell me the results of the steps described above?

Regards,
Carlos

September 10, 2025 at 4:34 pm #17391762

avivk-2

I already enabled the footer language switcher ( hidden link ), but it’s only showing English. It’s not displaying the other languages in the footer ( hidden link ) and in the language dropdown ( hidden link ).

September 11, 2025 at 9:20 am #17393347

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

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

Hi there,
Thank you very much for your message

Can you double-check that the homepage is translated to all languages, the translations are published, and the secondary languages are not hidden?