How to Add an Anchor Link in Squarespace

In this blog tutorial, learn how to create an anchor link on Squarespace

Let’s dive in..


Watch the video

Check out the YouTube video below 👇

The first thing we need to do to add an anchor link is to insert a code block in the section where we want the anchor link to point.

Image showing how to add the code block to Squarespace

Inside the code block, you need to paste the following code:

<p id=”about”></p> // The “about” you can name whatever you like.

This will serve as the ID that we need to reference when setting up the navigation.

I recommend placing the code block at the top of the section to ensure a smooth scrolling transition.

Code of how to get an anchor link to Squarespace

After adding the code, exit the editor and navigate to the Pages section.

  1. Click the “+” icon in the Main Navigation.

  2. Scroll down and select the “Link” option, which is located at the bottom of the selection menu.

Image showing the "link" navigation option on Squarespace

Once the "Link" option is selected, follow these steps:

  1. Add a Link Title – This will be the name displayed in the navigation menu.

  2. Enter the URL – This should point to the section we set up earlier.

Structuring the URL:

  • If the section is on the homepage, Squarespace recognizes the homepage as /.

Since we assigned the ID about earlier, the full URL will be: /#about

  • This ensures the page smoothly scrolls down to the intended section.

Example for Other Pages:

If you're adding an anchor link on a different page (e.g., a Team page), and you want to link to a section within that page, the format would be:

/team/#team-members

Here, /team/ represents the page URL, and #team-members is the anchor ID assigned within that section.

Image showing the correct URL to add in order to get anchor links working

Once the correct URL is added, clicking the link in the navigation bar will smoothly scroll you down to the designated section on the page.

Image showing the anchor links working
 

Your designer

I'm Victor Rolf, an expert Squarespace designer .If you'd like to discuss a potential project, you can email me at victor@rolfmade.com or get in touch here. Alternatively, book a free 15-minute consultation call here.

Previous
Previous

How To Add a Link to Images in Squarespace

Next
Next

How to Add a Pulse Effect to a Button in Squarespace