Jump to content

Creating an anchor link to a section I can't add a code block to

Go to solution Solved by Ziggy,

Recommended Posts

After following this tutorial I was able to make it so that when you click on the items in the header, it scrolls down the page to each relevant section. However, I am having an issue with getting the services header link to work properly.

https://onepagelove.com/squarespace-smooth-scroll

In order for the header link to scroll to the correct position on the page, the code block has to be placed in the portfolio section. However, the portfolio section doesn't allow me to add any code blocks.

For the time being, I added the code block to the services section itself. As you can see though, the anchor link takes you too far down on the page. Screenshot shows where code block is currently placed.

Any workaround or solution would be greatly appreciated. 

Screenshot 2022-11-07 at 8.53.31 AM.png

Edited by MikePintea
Added link, corrected phrasing
Link to comment
  • Solution

Can you share the site wide password? 

This can help with offsetting anchor links:
https://www.will-myers.com/articles/perfect-anchor-links-in-squarespace

Placing an anchor link on a portfolio section isn't always possible when you're using auto layout sections, but you can as a work around have a separate section for the title rather than use the content title.

Please like and upvote if my comments were useful to you. Thanks!

Zygmunt Spray
Squarespace Website Designer
Contact me: https://squarefortytwo.com/ 
🔌Ghost Squarespace Plugins (Referral link)
Buy me a coffee

Link to comment
15 minutes ago, Ziggy said:

Can you share the site wide password? 

This can help with offsetting anchor links:
https://www.will-myers.com/articles/perfect-anchor-links-in-squarespace

Placing an anchor link on a portfolio section isn't always possible when you're using auto layout sections, but you can as a work around have a separate section for the title rather than use the content title.

The anchor link offset was the solution!

Thank you yet again for the fantastic help 🙌

Link to comment

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.