Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0
81monkeys

Header code injection not accessible

Question

Site URL: https://www.screencast.com/t/jejJvOjXn

I'm attempting to add some code to the header as I have done before, however the code input text field is not allowing me to click on it or enter any text/code. Am I missing something here? I've added a screencast video link showing the problem.

Steps to reproduce:

1. Go to page in the Squarespace editor.
2. Select the gear beside the page name.
3. Under 'index settings' click on Advanced.
4. Attempt to click on the "PAGE HEADER CODE INJECTION" section.

Nothing happens and I've tried it on a few different sites that I have.

Thanks!

Share this post


Link to post

13 answers to this question

Recommended Posts

  • 0

Do you have a premium account?

You can't inject code on personal accounts.


Free Squarespace 7.1 Anchor Link and Accordion Plugins available here!

If I replied to one of your questions with code, it was either CSS or jQuery.

To add CSS, go to Design -> Custom CSS

jQuery needs some additional steps. Head here: https://code.jquery.com/ and click on minified, under jQuery 3.x and copy that code into Squarespace.

After you put that code into the code injection section in Squarespace, you can add the code I supplied. The code from me will need <script> added before it and </script> added after it (only for jQuery).

There are two places that you can add the code, one is site wide (adds to all pages). Settings -> Advanced -> Code Injection

The other is for a specific page (adds to one page only). Pages -> Gear Icon next to the page -> Advanced

Share this post


Link to post
  • 0

I want to inject code to make the navigation bar disappear in a particular page and appear another navigation bar instead. Can this be done in the Personal Plan?

Share this post


Link to post
  • 0

Yes, link to your page and I can get the CSS for you.


Free Squarespace 7.1 Anchor Link and Accordion Plugins available here!

If I replied to one of your questions with code, it was either CSS or jQuery.

To add CSS, go to Design -> Custom CSS

jQuery needs some additional steps. Head here: https://code.jquery.com/ and click on minified, under jQuery 3.x and copy that code into Squarespace.

After you put that code into the code injection section in Squarespace, you can add the code I supplied. The code from me will need <script> added before it and </script> added after it (only for jQuery).

There are two places that you can add the code, one is site wide (adds to all pages). Settings -> Advanced -> Code Injection

The other is for a specific page (adds to one page only). Pages -> Gear Icon next to the page -> Advanced

Share this post


Link to post
  • 0

To hide the current header add this to design -> custom css

This will only hide on that one page.

#collection-5f25e64798f17912e4b877c1 .Header {
    display: none;
}

 


Free Squarespace 7.1 Anchor Link and Accordion Plugins available here!

If I replied to one of your questions with code, it was either CSS or jQuery.

To add CSS, go to Design -> Custom CSS

jQuery needs some additional steps. Head here: https://code.jquery.com/ and click on minified, under jQuery 3.x and copy that code into Squarespace.

After you put that code into the code injection section in Squarespace, you can add the code I supplied. The code from me will need <script> added before it and </script> added after it (only for jQuery).

There are two places that you can add the code, one is site wide (adds to all pages). Settings -> Advanced -> Code Injection

The other is for a specific page (adds to one page only). Pages -> Gear Icon next to the page -> Advanced

Share this post


Link to post
  • 0
Posted (edited)

Great. It did hide the general navigation bar. Can I add a different navigation bar to this page now?

Thank you!!!

Edited by Hellen

Share this post


Link to post
  • 0

You can make it with the different blocks, or use a code block for html, but you can't add any scripts with a personal plan.


Free Squarespace 7.1 Anchor Link and Accordion Plugins available here!

If I replied to one of your questions with code, it was either CSS or jQuery.

To add CSS, go to Design -> Custom CSS

jQuery needs some additional steps. Head here: https://code.jquery.com/ and click on minified, under jQuery 3.x and copy that code into Squarespace.

After you put that code into the code injection section in Squarespace, you can add the code I supplied. The code from me will need <script> added before it and </script> added after it (only for jQuery).

There are two places that you can add the code, one is site wide (adds to all pages). Settings -> Advanced -> Code Injection

The other is for a specific page (adds to one page only). Pages -> Gear Icon next to the page -> Advanced

Share this post


Link to post
  • 0

I found a way around by using content links. 

Can you please send me the code to hide the navigation bar for the following pages? 

https://www.hellencolman.com/math/publications

https://www.hellencolman.com/math/conferences

https://www.hellencolman.com/math/teaching

https://www.hellencolman.com/math/collaborators

https://www.hellencolman.com/math/contact

Or just tell me where this 

#collection-5f25e64798f17912e4b877c1

that appear in the original code you send me come from so I can look for the identifier of these pages.

Share this post


Link to post
  • 0

It's in the body tag of the html, but it might be easier to show it only on certain pages. How many pages do you want it displayed on?


Free Squarespace 7.1 Anchor Link and Accordion Plugins available here!

If I replied to one of your questions with code, it was either CSS or jQuery.

To add CSS, go to Design -> Custom CSS

jQuery needs some additional steps. Head here: https://code.jquery.com/ and click on minified, under jQuery 3.x and copy that code into Squarespace.

After you put that code into the code injection section in Squarespace, you can add the code I supplied. The code from me will need <script> added before it and </script> added after it (only for jQuery).

There are two places that you can add the code, one is site wide (adds to all pages). Settings -> Advanced -> Code Injection

The other is for a specific page (adds to one page only). Pages -> Gear Icon next to the page -> Advanced

Share this post


Link to post
  • 0

I don't understand. Do I have access to the html code to see those numbers? Where exactly?

If not, please send me the code to hide the nav bar from these pages:

https://www.hellencolman.com/math/publications

https://www.hellencolman.com/math/conferences

https://www.hellencolman.com/math/teaching

https://www.hellencolman.com/math/collaborators

https://www.hellencolman.com/math/contact

It is only these ones the ones that I want no nav bar. The others, the ones where I want the nav bar to appear, are many more. 

Share this post


Link to post
  • 0

I found the answer in case that someone else is looking for the solution to hide navigation bar from a concrete page.

Go to the url of that concrete page. In Chrome's main menu select View >Developer > Developer Tools. There you see the body tag and Collection ID within double quotes. "collection-xxxxxxxxxxxxxxxxxxxxxxxx"

Where xxxxxxxxxxxxxxxxxxxxxxxx is the unique ID of that particular page you want to hide the nav bar from.

Then add in your Custom CSS the code:

#collection-xxxxxxxxxxxxxxxxxxxxxxxx .Header {
    display: none;
}

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...