Website Building » Squarespace » How Do I Add a Custom Code to Squarespace?

How Do I Add a Custom Code to Squarespace?

Last updated on October 1, 2022 @ 6:18 am

Adding custom code to your Squarespace site is a great way to add your own personal touch, or to extend the functionality of your site. There are two ways to add custom code to Squarespace: through the Code Injection tool, or by adding a Code Block.

Code Injection:

Code Injection is a feature that allows you to add your own custom HTML, CSS, and JavaScript to your site. You can access Code Injection under the Design tab in your Site Manager. To learn more about using Code Injection, check out our Using Code Injection support guide.

PRO TIP: Please be aware that adding custom code to your Squarespace site can result in unexpected changes to the site’s appearance and functionality. If you are not comfortable working with code, we recommend that you seek out a professional developer to help you make the changes you need.

Code Blocks:

Code Blocks are a versatile Squarespace feature that allow you to insert HTML, CSS, and JavaScript into your site.

Unlike Code Injection, which applies your code site-wide, Code Blocks only affect the content within the block itself. This makes them ideal for adding custom code to individual pages or blog posts. To learn more about using Code Blocks, check out our Working with Code Blocks support guide.

Conclusion:

Both the Code Injection tool and Code Blocks are great ways to add custom code to your Squarespace site. If you want to add code that will affect your entire site, then Code Injection is the way to go.

However, if you only want to add code to specific pages or blog posts, then Code Blocks are a better option. Whichever method you choose, be sure to check out our support guides for more information.

Dale Leydon

Dale Leydon

Sysadmin turned Javascript developer. Owner of 20+ apps graveyard, and a couple of successful ones.