Background of the issue:
I am trying to add a custom language switcher using a shortcode to the top header and footer of my site, hidden link. I am following a WPML support article for guidance.
Symptoms:
The language switcher is not linking to the current page but instead redirects to the home page in different languages.
Questions:
Why is the language switcher redirecting to the home page instead of the current page in different languages?
Thank you for contacting WPML Support. Could you please try to follow the below steps and see if this resolves the issue:
1. Please make sure the pages are translated into secondary languages.
2. The status of the pages are set as Published and not Draft.
Here’s how you can confirm this:
- Go to the Pages >> All Pages page.
- Switch to the secondary language using the admin language switcher and check if they are set as "Draft." as you can see in the attached screenshot.
- If they are, navigate to WPML >> Translations and approve the translations to set them as "Published."
- Clear all sorts of cache from your site/server/CDN and see if this resolves the issue.
3. Enable the Footer language switcher for a moment from WPML >> Languages > Footer language switcher and see if it works correctly with footer language switcher.
Please let me know the results
Thank you
The topic ‘[Closed] Language switcher is not linking to current page but links to home /en or /FR’ is closed to new replies.