0

I tried to add the custom javascript code in code injection,

It worked and I can see the code on all pages.

But I need this form only homepage

This is my code

<div class="_form_8"></div><script src="https://adriamarble.*****com/f/embed.php?id=***" type="text/javascript" charset="utf-8"></script>

1 Answer 1

1

Instead of using the global header or footer injection points, use the per-page header code injection for just that specific page.

You can also inject code into a specific page:

1) Hover over the page in the Pages panel.
2) Click the icon.
3) Click Advanced.

Page Header Code Injection adds code to the tag of that page.

If you need to add code to the body of a specific page, add a Code Block or Markdown Block and then insert your code there.

Sign up to request clarification or add additional context in comments.

3 Comments

I need to add script to body No header and footer
You said "I tried to add the custom javascript code in code injection, It worked and I can see the code on all pages.". It sounds like it worked when you added it to header/footer code injection. So where did you add it? In Squarespace the term "code injection" always refers to header and footer. If you added it somewhere else, please clarify. Also, I added to my answer to include using code blocks or markdown blocks.
Thanks so much this is helpful for me

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.