I am working on a bespoke WordPress build and for some reason, I just cannot get some anchor links to work. It’s driving me potty and I just don’t know what the problem is.
I have discovered, static anchor links are working fine (the back to top button works). However, I am using Advanced Custom Fields to generate ID’s for the anchor tags. The IDs are generating correctly, but won’t work as anchor tags.
Anyone have any ideas? The staging url is here. The bit I am referring to is the service boxes near the bottom of the page. The idea being you click on these and that they will take you to the services page, and down to the relevant section.
The markup I am using is:
<a href="/services/#example"></a> <ul> <li id="#example"></li> </ul>
Read more here: Anchor links just won’t work