Jump to content

How to hide a navigation item for certain page

Go to solution Solved by Ziggy,

Recommended Posts

Posted

<style>
.header-nav [href="/contact"] {
    display: none;
}
.burger-box {
    visibility: hidden;
}
</style>

 

with this code, I made it happen. But this time, some spaces appeared in hidden items. how can I remove that spaces? Its disturbing because there is also two more nav item and I can see that spaces between them.

Posted

Can you share your website URL?

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Posted

You can add a site wide password and then share your URL and the password:

https://support.squarespace.com/hc/en-us/articles/205815528-Site-wide-passwords

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

  • Solution
Posted

Yes, that extra space is irritating! Your current method, although better in many ways to just target the link HREF, I can't seem to work that to hide the entire space, this may work better at hiding the space, using :nth-child(2) and :nth-child(3) to hide the 2nd and 3rd like this:

<style>
.header-nav-item:nth-child(2) {
      display: none;
  }
</style>

 

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Posted
13 minutes ago, Ziggy said:

Yes, that extra space is irritating! Your current method, although better in many ways to just target the link HREF, I can't seem to work that to hide the entire space, this may work better at hiding the space, using :nth-child(2) and :nth-child(3) to hide the 2nd and 3rd like this:

<style>
.header-nav-item:nth-child(2) {
      display: none;
  }
</style>

 

Ziggy, thank you very much. This one is perfect! 

Posted
Just now, buura said:

Ziggy, thank you very much. This one is perfect! 

No problem! Can you mark my post as the solution and give it a thumbs up? Thanks!

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

  • 4 months later...
Posted
On 4/4/2023 at 10:02 PM, tuanphan said:

Yes. Possible. But you will need to add code manually to all password protected page.

What is your site url?

mlpha.org is the site address. I'm setting up an interactive, password-protected page for a location-only experience. Once on the private page, the public navigation is not applicable so a separate navigation or no navigation would be better. 

  • 1 year later...
Posted
On 11/24/2022 at 8:00 AM, Ziggy said:
<style>
.header-nav-item:nth-child(2) {
      display: none;
  }
</style>

Hi,

Where was this code added? Was it in custom CSS or header code on individual page? Thanks!

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.