Skip Navigation

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

Problem:
The client is experiencing issues with anchor links not working on translated pages of their website. Specifically, the buttons 'What we do' and 'References' do not scroll to the intended sections on the non-default language pages.
Solution:
We recommend checking the source code of the translated pages to ensure that the anchor IDs have been correctly translated. For instance, on the English page, the anchor originally identified as

#zamereni

might have been translated to

#focus

. If the button's URL still points to the original anchor (e.g.,

#zamereni

), it needs to be updated to match the translated anchor ID (e.g.,

#focus

).
To do this, open the WPML Advanced Translation Editor and use the search function at the top to locate the URL. Once found, update the URL to reflect the translated anchor ID.

If this solution does not resolve the issue or 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. If problems persist, please open a new support ticket at WPML support forum for further assistance.

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 0 voices.

Last updated by jiriN-8 1 month, 3 weeks ago.

Assisted by: Bobby.

Author Posts
March 11, 2025 at 12:41 pm #16801618

jiriN-8

Background of the issue:
I am trying to make the first two buttons on the home page scroll to the anchor 'our focus' and 'references'. I have translated the whole page to EN, PL, and SK, with CZ as the default. The buttons work only on the default CZ page. The issue can be seen at hidden link.

Symptoms:
The first button 'What we do' should scroll to elementor anchor #zamereni and the second button 'References' should scroll to elementor anchor #reference, but nothing happens.

Questions:
Why do the anchor links not work on the translated pages?
How can I fix the anchor links to work on all translated pages?

March 11, 2025 at 8:37 pm #16804059

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi there,

The anchors can be found in the source under the following ID

<div class="elementor-menu-anchor" id="focus"></div>

when reviewing the source of the EN page I can see that the anchor has been translated to 'focus', but the button's URL still points to #zamereni

Please open the translation and use the search function within the WPML Advanced Translation Editor (at the very top) and search for the URL.

once you locate it you should be able to translate it as well.

Let me know your results, please.

March 12, 2025 at 7:57 am #16805339

jiriN-8

works like a charm 🙂 Thanks!