Jump to content

[Share] Remove Header on One Page

Recommended Posts

 Some custom code to remove header on Entire Site - One Page

Support: SS 7.0 & SS 7.1

7.1 is latest version. Most sites you just created, or created in the last few months, always default to 7.1

Notes: 

  • Add to Home > Design > Custom CSS or Website > Website Tools > Custom CSS

Squarespace 7.1

(7.1) One Page

Add to Page Header or Code Block on that page

<style>
  header#header {
  	display: none !important;
  }
</style>

(7.1) Desktop only

Add to Custom CSS

@media screen and (min-width:992px) {
  header#header {
  	display: none !important;
  }
}

(7.1) Mobile only

@media screen and (max-width:991px) {
  header#header {
  	display: none !important;
  }
}

(7.1) After Scroll

header#header.shrink {
  	display: none !important;
  }

(7.1) Before Scroll

header#header:not(.shrink) {
  	display: none !important;
  }

(7.1) When overlay menu/burger menu is open

body.header--menu-open header#header {
  	display: none !important;
  }

(7.1) Blog List Page Only

body[class*="type-blog"].view-list header#header {
  	display: none !important;
  }

(7.1) Blog Detail Post 

body[class*="type-blog"].view-item header#header {
  	display: none !important;
  }

(7.1) Specific blog post

Edit that post > Add a Code Block at bottom of post > Use this code

<style>
  header#header {
  	display: none !important;
  }
</style>

(7.1) Event List Page

body[class*="type-events"].view-list header#header {
  	display: none !important;
  }

(7.1) Event Detail

body[class*="type-events"].view-item header#header {
  	display: none !important;
  }

(7.1) Specific event items

Edit event > Add a Code Block at bottom of event

<style>
  header#header {
  	display: none !important;
  }
</style>

(7.1) Shop/Category Page

body[class*="type-products"].view-list header#header {
  	display: none !important;
  }

(7.1) Product Detail

body[class*="type-products"].view-item header#header {
  	display: none !important;
  }

(7.1) 1 product

Edit product > Add a Code Block in Additional Info

<style>
  header#header {
  	display: none !important;
  }
</style>

(7.1) Some specific products

First add a tag with name: no-header, then assign it for some products, then use this code to Custom CSS

.tag-no-header header#header {
  	display: none !important;
  }

(7.1) Cart Page

body#cart header#header {
  	display: none !important;
  }

(7.1) Search Page/Search Results

Add code to Website > Website Tools > Code Injection > Footer

<script>
if (document.location.pathname.indexOf("/search") == 0) {
    document.querySelector('body').classList.add('t-search')
}
  </script>
<style>
  body.t-search header#header {
  	display: none !important;
  }
</style>

 

Avenue

header#header {
    display: none;
}
div#mobileMenuLink {
    display: none;
}

Aviator

header#header {
    display: none;
}

 

Bedford Family

Include: Anya, Bedford, Bryant, Hayden, Bedford

header#header {
    display: none;
}

 

Brine Family

Include: Aria, Basil, Blend, Brine, Burke, Cacao, Clay, Custom Template, Ethan, Fairfield, Feed, Foster, Greenwich, Hatch, Heights, Hunter, Hyde, Impact, Jaunt, Juke, Keene, Kin, Lincoln, Maple, Margot, Marta, Mentor, Mercer, Miller, Mojave, Moksha, Motto, Nueva, Pedro, Polaris, Pursuit, Rally, Rover, Royce, Sofia, Sonny, Sonora, Stella, Thorne, Vow, Wav, West, Brine.

/* Hide Header */
.Header {
    display: none !important;
}

 

Farro:

Include: Farro, Haute

.Mobile-bar {
    display: none;
}
header.Header {
    display: none !important;
}

Five

div#navigation-top {
    display: none;
}
nav#mobile-navigation {
    display: none !important;
}

Flatiron

header#topBar {
    display: none;
}

Forte

div#headerWrapper {
    display: none;
}

Ishimoto

header#header {
    display: none;

Momentum

header#header {
    display: none;
}

Montauk

Include: Julia, Kent, Montauk, OM

header#header {
    display: none;
}

Native

header#header {
    display: none;
}

Pacific Family

Include:  Bryler, Charlotte, Fulton, Horizon, Naomi, Pacific

header#header {
    display: none;
}

Skye Family

Include: Foundry, Indigo, Ready, Skye, Tudor

div#headerAnnouncementWrapper {
    display: none;

Tremont

Include: Camino, Carson, Henson, Tremont

header#siteHeader {display: none;}

Wexley

header#header {
    display: none;
}
/* Mobile */
div#mobileMenuLink {
    display: none;
}

York Family

Include: Artesia, Flores, Harris, Jasper, Jones, Lange, Shibori, Taylor, York

header#header {
    display: none;
}
 
Edited by tuanphan
update more code, edit title

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

And what if I'd like to edit the items that I want to be displayed in the navigation menu? Is there a way to hide pages from automatically showing up in the navigation menu? 

Link to comment
36 minutes ago, Ignas said:

And what if I'd like to edit the items that I want to be displayed in the navigation menu? Is there a way to hide pages from automatically showing up in the navigation menu? 

Each template needs different code. If you don't share site url, difficult to help.

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
Guest ladyniks

Thank you  - this is great, however after removing the header, the image is not centered on the page. Is there a way to repair this?

 

url : huesofcomfort.com (testing page)

pw: welcome123

Link to comment
16 hours ago, ladyniks said:

Thank you  - this is great, however after removing the header, the image is not centered on the page. Is there a way to repair this?

 

url : huesofcomfort.com (testing page)

pw: welcome123

I see it center? Can you take screenhost?

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
7 hours ago, ladyniks said:

@tuanphan i got it centered - i was just trying to create a white frame around the "cover page" - something similar to this: https://erinnicole.art/

Add to Page Settings > Advanced > Header

<style>
  body {
    border: 20px solid #fff;
}
</style>

 

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
  • 1 month later...
1 hour ago, gehernando said:

Hello! I was able to follow these instructions to remove the header from my Impact Template (Brine) on a specific page:

https://wisteria-lime-er8m.squarespace.com/linkedin-course

However, how can I remove it from the mobile view too?

Thanks!

.Mobile-bar.Mobile-bar--top {
    display: none;
}

 

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
  • 1 year later...
On 2/13/2020 at 9:33 AM, tuanphan said:

 Some custom code to remove header on Entire Site - One Page

Support: SS 7.0 & SS 7.1

Notes: 

  • Add to Home > Design > Custom CSS
  • To remove on one page, wrap code in <style>paste my code here</style> and insert to Page Settings > Advanced > Header
  • if you use Personal Plan, you want to remove header on One Page, you can add Page ID to before the code, eg: body#collection-abcxyz123 header#header {display: none;}
  • If you have any questions, just comment below/send me a message via link in signature

Avenue

header#header {
    display: none;
}
div#mobileMenuLink {
    display: none;
}

Aviator

header#header {
    display: none;
}

 

Bedford Family

Include: Anya, Bedford, Bryant, Hayden, Bedford

header#header {
    display: none;
}

 

Brine Family

Include: Aria, Basil, Blend, Brine, Burke, Cacao, Clay, Custom Template, Ethan, Fairfield, Feed, Foster, Greenwich, Hatch, Heights, Hunter, Hyde, Impact, Jaunt, Juke, Keene, Kin, Lincoln, Maple, Margot, Marta, Mentor, Mercer, Miller, Mojave, Moksha, Motto, Nueva, Pedro, Polaris, Pursuit, Rally, Rover, Royce, Sofia, Sonny, Sonora, Stella, Thorne, Vow, Wav, West, Brine.

/* Hide Header */
.Header {
    display: none !important;
}

 

Farro:

Include: Farro, Haute

.Mobile-bar {
    display: none;
}
header.Header {
    display: none !important;
}

Five

div#navigation-top {
    display: none;
}
nav#mobile-navigation {
    display: none !important;
}

Flatiron

header#topBar {
    display: none;
}

Forte

div#headerWrapper {
    display: none;
}

Ishimoto

header#header {
    display: none;

Momentum

header#header {
    display: none;
}

Montauk

Include: Julia, Kent, Montauk, OM

header#header {
    display: none;
}

Native

header#header {
    display: none;
}

Pacific Family

Include:  Bryler, Charlotte, Fulton, Horizon, Naomi, Pacific

header#header {
    display: none;
}

Skye Family

Include: Foundry, Indigo, Ready, Skye, Tudor

div#headerAnnouncementWrapper {
    display: none;

Tremont

Include: Camino, Carson, Henson, Tremont

header#siteHeader {display: none;}

Wexley

header#header {
    display: none;
}
/* Mobile */
div#mobileMenuLink {
    display: none;
}

York Family

Include: Artesia, Flores, Harris, Jasper, Jones, Lange, Shibori, Taylor, York

header#header {
    display: none;
}

Squarespace 7.1

header#header {
    display: none;
}

 

Hi, tried the code to remove the navigation from a Five website. Doesn't appear to work. Any ideas? Thanks

Screen Shot 2021-10-08 at 10.20.05 am.png

Link to comment
On 10/8/2021 at 7:25 AM, BugDoctor said:

Hi, tried the code to remove the navigation from a Five website. Doesn't appear to work. Any ideas? Thanks

Screen Shot 2021-10-08 at 10.20.05 am.png

Hi. Can you share link to page where you want to remove header?

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
  • 4 months later...
  • 1 month later...
1 hour ago, infaux said:

Hey tuanphan, thanks for all of your support on this subject. Unfortunately, I still can't get my code working properly. I was able to remove the entire header but what I need is to remove just the Site Title (Logo and Tagline ) from the page below; this is the Skye family.

https://www.printmaker-studio.com/curatededitions

Any help would be greatly appreciated. Thank you!!

Add to Design > Custom CSS

/* Curated edition */
body#collection-620710382460613189ac18eb .logo-wrapper.flex-item {
    visibility: hidden;
}

 

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...
  • 2 months later...
2 hours ago, FMalvar said:

Hey there @tuanphan 😀

I want to remove the homepage link on the navigation, could you help me please? 

Captura de ecrã 2022-08-30, às 13.01.29.png

nav.png

Access Pages > Drag Home Link from Main Navigation to Not Linked.

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
  • tuanphan changed the title to [Share] Remove Header on One Page
  • 4 months later...
On 12/28/2023 at 6:22 AM, newtowebsites1 said:

Looking to hide 1 footer design in mobile view and 1 footer design in web-view. Any idea on how to do this? When I use the code, they both disappear 

You can do 2 sections in Footer, then use some code like this to hide 1 on desktop, hide 1 on mobile

/* hide section 1 on desktop */
@media screen and (min-width:768px) {
	footer.sections section:nth-child(1) {
		display: none !important;
}
}
/* hide section 2 on mobile */
@media screen and (max-width:767px) {
footer.sections section:nth-child(2) {
		display: none !important;
}
}

 

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

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.