Skip Navigation

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

Problem:
You are experiencing issues with the Language Switcher Menu on touch (mobile) devices, where the menu cannot be expanded to select another language without activating the link to the current page, causing a page reload.
Solution:
We recommend adding the following CSS to the custom CSS section of your theme to resolve the issue:

.wpml-ls-current-language > a {<br />    pointer-events: none !important;<br />}

If the problem persists, please provide a debug report in the Debug Information box. You can find instructions on how to do this here: https://wpml.org/faq/provide-debug-information-faster-support/

If this solution does not apply to your case, or if it seems outdated, we 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. Should you need further assistance, please open a new support ticket 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.

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Noman 2 weeks, 5 days ago.

Assisted by: Noman.

Author Posts
October 26, 2024 at 6:55 am #16332837

erikM-19

I am trying to remove the anchor link of the current selected language in the Language Switcher Menu: hidden link

This is causing issues on touch (mobile) devices where the menu cannot be expanded to select another language without activating the link to the current page, resulting in a page reload: hidden link

October 27, 2024 at 8:45 am #16334116

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting WPML Support. Sorry for the delay due to high workload. The reply time will be shorter from now. I watched the video and visited your site and I can see the issue in language switcher. Could you please add the below CSS in the custom CSS section of your theme:

.wpml-ls-current-language > a {
    pointer-events: none !important;
}

And see if this resolves the issue.

If the issue persists, please add the debug report in the Debug Information box. I have also enabled debug info box for your next reply: https://wpml.org/faq/provide-debug-information-faster-support/

Kindly let me know the results,
Thank you

October 28, 2024 at 12:49 pm #16337769

erikM-19

Hi Noman,

Your fix works perfectly—thanks!

P.S. It might be best to remove the href attribute from the language selector entirely in a coming WPML update, as this would provide the cleanest solution for all WPML users!

Kind regards
Erik Molenaar