Jump to content

Issues inserting an html code onto my site

Recommended Posts

Site URL: https://soulerarecords.com/hues

Hey!

I'm having a bit of an issue inserting a code into the code block on my website for a timer, I was able to do it prior to Squarespace changing their code block design and interface, but it doesn't allow me to do so now as it splits it into two separate lines.

Below is the code I'm trying to insert:

<script src="https://cdn.logwork.com/widget/countdown.js"></script>
<a href="https://logwork.com/countdown-phji" class="countdown-timer" data-style="columns" data-timezone="America/New_York" data-textcolor="#ffffff" data-date="2021-06-26 17:00" data-digitscolor="#ffffff" data-unitscolor="#ffffff"></a>

And here are the instructions from the maker of the timer widget on how to insert the code on Squarespace, which show a much different code block: https://logwork.com/blog/how-to-add-a-countdown-timer-to-squarespace

Thank you in advance.

Link to comment
  • Replies 6
  • Views 538
  • Created
  • Last Reply

Hello,

What version of Squarespace are you using? I generated a timer using the website you used and was able to add it using a Code Block in 7.1 with no issues. I tested the same code on Squarespace 7.0, Brine Template Family and didn't have any issues either.

By splitting into two lines, do you mean that the widget itself "wraps" around itself after you've hit save/refresh? Or do you mean that the Code Block menu you use to insert the code is split into multiple lines? If you could please attach a screenshot of the problem, it may help us troubleshoot the issue.

Screen Shot 2021-06-10 at 11.58.59 AM.png

Link to comment
1 hour ago, Wolfsilon said:

Hello,

What version of Squarespace are you using? I generated a timer using the website you used and was able to add it using a Code Block in 7.1 with no issues. I tested the same code on Squarespace 7.0, Brine Template Family and didn't have any issues either.

By splitting into two lines, do you mean that the widget itself "wraps" around itself after you've hit save/refresh? Or do you mean that the Code Block menu you use to insert the code is split into multiple lines? If you could please attach a screenshot of the problem, it may help us troubleshoot the issue.

Screen Shot 2021-06-10 at 11.58.59 AM.png

I'm using version 7.0, when I add the code it splits it into multiple lines as shown below. I'm also using this on an index page, which has worked for me in the past.

Untitled-4.png

Link to comment

Okay, I gotcha. When you insert the code, even if it is two lines in the code box, does it not appear or insert correctly? The copy and paste widget itself contains the "<script>" tags and the "<a>" tags with the entire code being multiple lines so this shouldn't cause any issues.

Link to comment
3 minutes ago, Wolfsilon said:

Okay, I gotcha. When you insert the code, even if it is two lines in the code box, does it not appear or insert correctly? The copy and paste widget itself contains the "<script>" tags and the "<a>" tags with the entire code being multiple lines so this shouldn't cause any issues.

This is what is displayed for me

Untitled-5.png

Link to comment

 

10 minutes ago, Wolfsilon said:

Go back to the website and regenerate the widget code. I got the same error when I used the original code.

It's working now! It seems like the issue is that it wouldn't work without the countdown timer having a title, thank you for your help.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.