All my navigation links go to sections of the home page. I am trying to create a Component for consistent navigation on all pages of my site. I’m using the “slash-hash” method to add a link URL such as:
/#testimonials-section
But it doesn’t work. There are now two problems:
on the home page, the Contact Us link doesn’t work at all, and
on any other page such as /terms, the links take you to the home page but not the section.
Any idea what I’m doing wrong? Or is there another (easier!) way to do this?
You have a scripting issue with some custom code you’ve written, which is trying to manipulate the URL. Have a look at your dev console and you’ll see it.