Anchor links within one page do not work

Hi there,

if we navigate to an anchor link on a second page starting at the homepage the anchor links do work. I am pretty sure they did work pretty finde in general until now.

If we then navigate to another anchor link on the same page (second page) nothing happens. The ids are correct and also the prime menu is corret.

Why does this not work anymore?

Please have a look at the Secure Note.

Best regards

Hi @knowmates,

Since all of this 3 link are going to that same page, please use One Page Navigation there.

You need 2 menus.

First menu, this will be your current menu that is set as your GLOBAL menu using absolute URL to those 3 links.

https://www.site.de/page-with-links/#link1
https://www.site.de/page-with-links/#link2
https://www.site.de/page-with-links/#link2

Second menu, create another menu. Same content. The only difference is this time, you will use relative URL to link on page-with-links.

#link1
#link2
#link2

To understand better, please read ONE PAGE NAVIGATION documentation.

Hope this helps.

Hello @lely,

I just copied the primary menu and replaced the absolute URLs of the individual links with the IDs. Am I right that the IDs have to be set at the section element and not at image elements oder text elements?

Then I activated the copied menu but it still does not work.

Therefore I reactivated the ‘old’ primary menu.

Would you mind having a closer look? Please take note of the Secure Note.

Best regards

Hi @knowmates,

Correct.

The old primary menu will still be set as your global menu. What’s left on your process is to set the Header neu One Page Navigation menu as ONE PAGE NAVIGATION on Outsourcing page settings:

Please set it and then check again.

Hello @lely,

I just tried setting the one page navigation in the page settings, but it does not work either. I also cleared the cache but no success.

Do you have any other ideas?

Best regards

Hey @knowmates,

I checked your setup and I see you’re using incompatible versions of X and Cornerstone. Please make sure to update both to their latest versions to avoid incompatibility issues. You can find the latest version numbers here: (https://theme.co/docs/version-compatibility) Then you can compare them to what’s installed on your site.

If you find anything to be out of date, you can review our update guide.

After doing the updates, always remember to clear all caches (if you are using WP Rocket, WP SuperCache or W3 Total Cache) when updating so that the code from the latest release is always in use. This will help you to avoid any potential errors.

Let us know how this goes!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.