Jump to content

Hiding nav menu links for specific pages

Go to solution Solved by Ziggy,

Recommended Posts

  • Replies 8
  • Views 878
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

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!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment
  • Solution

Try this Custom CSS:

// hide links on every page
.header-menu-nav-item:nth-child(1) {display:none;}
.header-menu-nav-item:nth-child(3) {display:none;}
.header-menu-nav-item:nth-child(6) {display:none;}
#collection-65e2265c5a803a43536b24c4 {
  // show links on homepage
  .header-menu-nav-item:nth-child(1) {display:initial;}
  .header-menu-nav-item:nth-child(3) {display:initial;}
  .header-menu-nav-item:nth-child(6) {display:initial;}
  // hide links on homepage
  .header-menu-nav-item:nth-child(2) {display:none;}
  .header-menu-nav-item:nth-child(4) {display:none;}
  .header-menu-nav-item:nth-child(7) {display:none;}
}

 

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!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment
6 minutes ago, Ziggy said:

Try this Custom CSS:

// hide links on every page
.header-menu-nav-item:nth-child(1) {display:none;}
.header-menu-nav-item:nth-child(3) {display:none;}
.header-menu-nav-item:nth-child(6) {display:none;}
#collection-65e2265c5a803a43536b24c4 {
  // show links on homepage
  .header-menu-nav-item:nth-child(1) {display:initial;}
  .header-menu-nav-item:nth-child(3) {display:initial;}
  .header-menu-nav-item:nth-child(6) {display:initial;}
  // hide links on homepage
  .header-menu-nav-item:nth-child(2) {display:none;}
  .header-menu-nav-item:nth-child(4) {display:none;}
  .header-menu-nav-item:nth-child(7) {display:none;}
}

 

Thanks Ziggy, it worked except there is now a wide space in the nav menu. Is there a way to fix that?

Screenshot 2024-03-13 123858.png

Link to comment

Strange, try this:

.header-menu-nav-item a {
    margin: 1vw 5vw;
}

 

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!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment
28 minutes ago, Ziggy said:

Strange, try this:

.header-menu-nav-item a {
    margin: 1vw 5vw;
}

 

Thank you so much Ziggy, that worked too!

But the mobile menu links are uneven for some reason

Screenshot 2024-03-13 140025.png

Link to comment

It looks like that is because of this CSS you have on your website:

.header-menu-nav-item {
    margin: 50px 0;
}

 

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!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

 Did I help? Buy me a coffee?

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.