Jump to content

How to use different site headers on different pages on 7.1?

Recommended Posts

18 hours ago, blittle said:

Hello, I have a similar issue to the ones above. I have a site where I am trying to create a page with a different header and footer to the main navigation, as well as a different menu. Is this at all possible? 

I am not on a plan that gives me access to inject custom codes on specific pages, so maybe this wont work? But I am not sure how to go about this. 

 

The page I am trying to change is: https://dianejonesdesign.co.uk/teaching-website

(- I have only removed the website's header and footer and done a make shift header and footer from buttons and text - not sure if this is all I can do...?)

and the normal homepage that i don't want to be affected is: https://dianejonesdesign.co.uk (+the rest of the site)

 

Please let me know if this is at all possible!

 

Thanks

I wrote this quick guide, you try follow

If you still can't get right code for your site, let me know, I will check & give code

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 2 months later...
  • Replies 27
  • Views 16.7k
  • Created
  • Last Reply

Top Posters In This Topic

On 2/24/2023 at 6:37 AM, creedon said:

Add the following to Page Settings > Advanced > Page Header Code Injection for the page. Please see per-page code injection.

<style>

  /* hide some elements in header */
  
  /* desktop */
  
  html:not( .squarespace-damask ) .header-nav .header-nav-item:nth-child( 3 ),
  html:not( .squarespace-damask ) .header-nav .header-nav-item:nth-child( 4 ),
  html:not( .squarespace-damask ) .header-actions--right .header-actions-action,
  
  /* mobile */
  
  html:not( .squarespace-damask ) .header-menu [data-folder="root"] .header-menu-nav-item:nth-child( 3 ),
  html:not( .squarespace-damask ) .header-menu [data-folder="root"] .header-menu-nav-item:nth-child( 4 ),
  html:not( .squarespace-damask ) .header-menu .header-menu-cta
  
    {
    
      display : none;
      
      }
      
  </style>

This is for v7.1.

Let us know how it goes.

This was so useful! The only thing is when I entered it, it momentarily deleted the headers I didn't want to see, then they bounced back. I'm wondering if it's because I'm using folders in the Navigation header - does the code change if you are using (dropdown) folders? 

Link to comment
On 11/19/2023 at 1:14 PM, Lucy-Annison said:

I'm wondering if it's because I'm using folders in the Navigation header - does the code change if you are using (dropdown) folders?

I wouldn't be able to comment without seeing your site.

Please post the URL for a page on your site where we can see your issue.

A link to the backend of the your site won’t work for us, i.e. a url that contains /config/.

Please set up a site-wide password, if your site is not public and you've not already done so.

Post the password here.

Adding a site-wide password does not allow anyone to alter your site. It only allows those with the password to see your site.

Please read the site-wide password and how to share a link documentation to understand how they work.

We can then take a look at your issue.

You may find How to post a forum question post useful.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

Create an account or sign in to comment

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


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