Jump to content

Syntax error when adding custom code

Recommended Posts

I'm trying to add a widget in a block on the home page and when I insert the custom code it says "syntax error on line 1".

This is the code:
<script type="text/javascript" src="https://www.cqc.org.uk/sites/all/modules/custom/cqc_widget/widget.js?data-id=1-8373894706&data-host=https://www.cqc.org.uk&type=location"></script> 

Can anyone tell me what the syntax error might be please?
Many thanks for your help.

Link to comment
  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Try this:

<script type="text/javascript" src="//www.cqc.org.uk/sites/all/modules/custom/cqc_widget/widget.js?data-id=1-8373894706&data-host=www.cqc.org.uk&type=location"></script> 



Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
Spark Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment

Sounds to me like you are trying to enter the code in Design > Custom CSS. Only CSS can go there.

What you have is HTML and needs to go in a code block or other location that accepts HTML.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

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.