That code you found isn't working in Squarespace? Here are 4 reasons why…

So after quick Google search you found some code that will help you get the look you’re going for in Squarespace… but it doesn’t work… so you search again and again… and hours later you have tried tons of different code snippets but none of them seem to work.

You know you can’t ask Squarespace Help Chat because they don’t support custom code. So you post in Squarespace Forums and Facebook Groups hoping some nice coder will help you figure out what’s wrong.

Frustrating I know! You don’t have time for this…

There are many reasons that the code you found for Squarespace isn’t working and it may have nothing to do with the code being written incorrectly. So in this guide I am going to go over the four main reasons the code you found isn’t working.

 

#1) It is not written for Squarespace.

There is not one “right way” to code something. Coding is a language and just like other languages, there are a bunch of different ways to say the same thing. Each website platform has a different coding structure and uses different coding strategies. If the code you found is not written for Squarespace, chances are it will not work without some heavy editing and reworking.

 

#2) It is not written for the version of Squarespace you are on.

Speaking of coding structure, Squarespace 7.1 uses a different coding structure than 7.0. This is why you cannot just upgrade from 7.0 to 7.1 but have to rebuild from scratch. Similar to above, if the code you found is for 7.0, there is a chance it will not work in 7.1 and vice versa. Although it will likely be closer than using code meant for a different platform, it may still require some editing and reworking.

 

#3) It is clashing with other code on your site.

This is a common issue for plugins. If the code you found or purchased breaks something else on your site, this is most likely due to a conflict in your Javascript. For example, if the code uses JQuery, it is possible that you have loaded more than one JQuery Library onto your site and they are clashing. This can not only cause the codes to break but it can also slow down your site. This is one of the most common reasons for a Plugin to not work. Check out this blog post where I show you some solutions.

 

#4) It uses the wrong class or id.

We use classes and ids within our code to help us target specific elements later on. If you are not using the correct class or id you will be targeting the wrong element or more elements than you want to. Classes are used when we want to target a collection of elements such as all image blocks or all buttons. They will be common across websites using the same version of Squarespace. Ids are used when we want to target a specific element such as a particular button or image. These will be specific to your website.

 
why your CSS won't work Pinterest pin
 

So what do we do? Does this mean I shouldn’t use code in Squarespace if I am not a coder?

Absolutely not! All of these issues can be tricky to solve for beginner coders because it requires a good knowledge of coding structure. However, that does not mean you shouldn’t use code at all. It just means that you need to be picky about where you are looking for code. In order to save yourself hours and hours of time spent debugging code that isn’t designed for you, make sure that the code you are using is coming from a reputable source and is meant for the version of Squarespace you are working in.

 
Rebecca Grace

Rebecca Grace is a Squarespace CSS Expert and Website Designer.

https://rebeccagracedesigns.com
Previous
Previous

Change Image on Hover in Squarespace

Next
Next

How to Add a Multi-Layer Accordion Dropdown in Squarespace