Home›Support›English Support›[Waiting for user confirmation] The WPML language switcher appears only on the homepage and the dropdown does not appear on other pa...
[Waiting for user confirmation] The WPML language switcher appears only on the homepage and the dropdown does not appear on other pa...
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.
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?
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?
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 ).