Jump to content

Code anchor link with main navigation

Recommended Posts

Hi, 

hope to find a little help here. I have no idea about coding...

I tried to set anchor links - linking from the main navigation (placed a "link" instead of a new page) to a special block at the home page. I followed all guides to this topic so far. 

But it seems not working right. By clicking the link in the main navigation it's loading a while and then just the top of my home page is shown. It's not scrolling down to the section I want to. 

I've read in the guides that it should be useful to enter the website url and page slug before the specific id in the code. I've tried a few different ways but not working. Right now my code in the code box at the wished place on my home page looks like this: <div id="medienportfolio"></div>.

At which position do I have to enter the website url (https://begonia-moose-7s7y.squarespace.com/ and the page url (in my case /home)?

Thank you for your help!

Tina

Link to comment
  • Replies 8
  • Views 6.6k
  • Created
  • Last Reply

Hey! Anchor links should work if you add a link to your main nav "under pages." It's recommended that you do your full page url, followed by the page and then dive. For example, if you have an anchor link at the bottom of your homepage it would be "www.myurl.com/home/#medienportfolio".

That said, this is a known issue on the latest squarespace ungrade that anchor links are malfunctioning on some browsers/devices, particularly with mobile users. I had the same issue and tried to get help from support and was recommended to avoid using anchor links altogether as there is no estimated timeline on an engineering fix.

If it's not 100% critical that it work every time, go for it. If it is, I'd make a separate page. But if anyone else has ideas or a more reliable fix for this, I'd love to hear!

Hope that helps.

Link to comment
  • 1 month later...

We have a simple addon for this if you want to achieve anchor linking in a more streamlined manner for future sites, just keep the PDF access file on hand (downloaded on purchase) https://www.squareaddons.com/shop-2/p/anchor-linking -- also works in mobile 

If you are looking for a way to add Anchor Links, Gallery Blocks, or a Rotating Banner with Content Blocks overlaid in Squarespace 7.1, you can find all these plugins in our Squarespace add-on store here: www.Squareaddons.com -- Enjoy! 

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.