Anchor links not working without scroll first

If I load my page and don’t immediately scroll, clicking on an anchor link (via the top menu or buttons within the page), it scrolls to that anchor before scrolling again to another point on the page.
If I click again everything works as it should.
Anchor links also work if I:

  • scroll one line before clicking on the link and if I load it from another page.
  • load anchor link directly from another page

I have a top menu that is mostly created via loopers and dynamic data. Dynamic data is also throughout the page and is hiding sections. I also have JavaScript to fix the top menu looper dropbox boxes that don’t animate well when scrolling (removing the script does not fix the issue). The top menu is sticky, but again, turning it off doesn’t fix the issue. It’s not just the menu though, as I have buttons at the top fo the actual page that also don’t work.
Maybe scrolling the page by one line or via another page activates all the dynamic and hidden data? If so, how can I fix this?
The solutions via older questions (Anchor Links Issue) have not helped.
The website is:
Any help would be great.

Hello Ken,

I have inspected your site and I found out that there are two elements having the same ID.

Please be advised that an element ID must be unique. Having duplicates will cause an issue especially if you use them as anchor links.

Best Regards.

Thank you for pointing that out. I removed all of the duplicate IDs on the page, however, it didn’t help. I have also removed the header and footer to eliminate them as potential issues.
I created a special testing template to troubleshoot what it could be:
Thanks again,

Hi Ken,

I have checked the page you mentioned in your last comment and found the links are working as expected. I also checked the URL mentioned in your first post and found that it is now working after you removed the duplicate ID. If you are still facing the same issue, please provide login credentials for your site in a secure note to examine it further, including:

– WordPress Site URL & Login URL
– WordPress Admin username/password
– Specific page URL where you are facing this issue.

To create a secure note, click the key icon underneath any of your posts.


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