Add Elfsight Countdown Timer to Squarespace Navigation Bar

I will share some code to add Elfsight Countdown Timer widget (affiliate link) or this link (non-affiliate link) to Navigation Bar

A. Before following these steps, first you need to add Elfsight Countdown Timer code to Website Tools (under Not Linked) > Code Injection > Footer

B. Add Countdown Timer to Nav Bar

All code should add under Elfsight Code

Position 1. Before Navigation Bar

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
  setTimeout(function(){
	 $('.eapps-countdown-timer').appendTo('nav.header-nav-list');
},5000);
});
</script>
<style>
nav.header-nav-list {
    flex-wrap: nowrap;
    align-items: center;
}
nav.header-nav-list>div[class*="elfsight"] {
    padding: 0px !important;
}
</style>

Position 2. After Navigation Bar

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
  setTimeout(function(){
	 $('.eapps-countdown-timer').insertAfter('nav.header-nav-list>div.header-nav-item:last-child');
},5000);
});
</script>
<style>
nav.header-nav-list {
    flex-wrap: nowrap;
    align-items: center;
}
nav.header-nav-list>div[class*="elfsight"] {
    padding: 0px !important;
}
</style>

If you have any problems, you can comment below.
Because Squarespace Header has many layout types, each layout creates a different code structure, so it is difficult to write pre-written code for other positions.

If you need to add Countdown to other locations, just send the site url + tell me the location you want to insert, I will give you the code.

Hi Tuan, I’ve had lots of problems using Elfsight’s timers on my SS 7.1 site. Have you encountered the same? Specifically, when I want a timer to redirect when done, it also redirects the back end page, so I can’t even edit it unless I sign in through a different browser. They’ve written some custom code for me for some timers, which usually works ok, but regardless, it seems to really bog down my site if I’m using more than one timer. If you can fix this issue, I’d love to hire you.

1 Like

Suppose your site is: tina.squarespace.com
To disable code on backend, you can access this link: tina.squarespace.com/config/safe
and when you’ve done edit everything, you can click “Enable …” in bottom of screen

2 Likes