Jump to content

Anchor links back to home page not working

Recommended Posts

Posted

site URL: https://marsplanetarium.com 

Hello,

I'm having a little bit of trouble getting my navigation links to do exactly what I want. I have the anchors all set up and working correctly, but only if you click on them from the home page. 

99% of my site is all on the one home page, and I set up my header navigation links to smooth scroll to different sections, like #contact or #events, which is how they are set up in navigation. The problem is that if I add a separate "About" page, the navigation links seem to be looking for the anchor tags on the About page, where there are none.smoothscrollscrnsht.JPG.1a567f9cf111d07ee9a371dad3c50b40.JPG

I can fix it by including the whole site url in the navigation links (http://marsplanetarium/home/#contact) but then it always reloads the page, even when I click on them from the home page. This defeats the purpose of the smooth scrolling.fromaboutscrnsht.JPG.5797a9d513e36400eb4c6b415a500ae2.JPG

Is there a way to have both smooth scrolling without reloading on the homepage, but also jumping from About to Home and then the anchor when clicking from the about page? 

Thanks in advance!

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.