Jump to content

How to exclude code injection on Home page?

Recommended Posts

Site URL: https://www.twentyoneknots.com

Good morning all,

I have a piece of code that enables 'chat' functionality on our website.  This code needs to be imbedded before the </head> tag.  The code needs to be applied to the 'footer' section of every page (Settings -> Advanced -> Code Injection -> Footer).

Question is, how can I exclude code from being injected on the home page (as I would like it on all my other pages)?

Thank you.

JS

Link to comment
  • Replies 2
  • Views 519
  • Created
  • Last Reply
On 6/9/2020 at 8:22 PM, JSDorais said:

Site URL: https://www.twentyoneknots.com

Good morning all,

I have a piece of code that enables 'chat' functionality on our website.  This code needs to be imbedded before the </head> tag.  The code needs to be applied to the 'footer' section of every page (Settings -> Advanced -> Code Injection -> Footer).

Question is, how can I exclude code from being injected on the home page (as I would like it on all my other pages)?

Thank you.

JS

Hi there

The index page has a unique class name in body indicate it's role we may take advantage of that

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

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.