How to add code to one page only Squarespace

If you want to add code to a specific page on your Squarespace then you’re in luck. 

Not only is this something you can do, there are actually two different ways you can do it. 

I won’t waste any time, so keep reading to find out what they are.

How to add code to one page only on Squarespace 

The first way to do this is to head to pages and select the page you want to apply the code to.

By clicking the cog icon for the corresponding page you’ll bring up the page settings. Select advanced and this is where you can add your code for the specific page. 

If you want to add CSS here, you just need to paste the CSS in between some style tags. These look like this:

 <style> /code goes here - delete forward slash and asterisk on each end */ </style> 

Watch the video

Check out the YouTube video below 👇

The second option is the “CSS option”. For this option you’ll need to download the Chrome plugin, Squarespace ID Finder

When activated this free plugin will show you the ID’s for any collection, block or section on any Squarespace website. 

Navigate to Design > Custom CSS and add your custom code.


📩 Join the inner circle to get exclusive code updates


In order to ensure that the code only targets a specific page, use your Squarespace ID Finder plugin to get the collection ID for your target page. You can then paste the ID into your Custom CSS panel, wrapping the code with the ID. 

Your code should then look something like this:

#collection-ID-here {

.target-here {

code goes here

}

}

So there you have it, two different ways of applying code to a single page on Squarespace. 

If you found this helpful be sure to check out my guide to applying code to mobile only next!


Your designer

I'm Sam, an award-winning Squarespace web designer. I have worked with every type of business, building platforms for solo entrepreneurs through to multi-million dollar corporations. If you want to discuss a potential project, you can email on sam@bycrawford.com or get in touch with me here. Alternatively, you can book in a free 15-minute consultation call here.


Want more?

Sam Crawford

This article was written by Sam Crawford, one of the world’s leading Squarespace website designers.

Sam is an official Squarespace Expert, official Squarespace Partner, official Squarespace Community Leader, official Squarespace blog contributor, official Squarespace panelist, Squarespace educator and multi-award winning Squarespace designer.

https://bycrawford.com
Previous
Previous

Host videos on Squarespace [Squarespace video pages explained]

Next
Next

Different logo on mobile Squarespace 7.1