AndrewFreedman Posted June 9, 2021 Share Posted June 9, 2021 Site URL: https://andrewfreedman.com Hello, I am currently working on the 404 page of my site and I would like to hide just the navigation on the 404 page and keep it on the main page. I tried a few different pieces of code but the closest I have seen to get is just hiding the entire header. I need this because I realized my menu is made up of anchor links so they are useless on the 404 page. Any help would be greatly appreciated! Best, Andrew Freedman Link to comment
christyprice Posted June 9, 2021 Share Posted June 9, 2021 <style> .header-nav {display: none!important; } .header-burger {display: none!important; } </style> You’ll paste this code into your Advanced Page Settings for the particular page you want to target to remove the navigation. The first class removes desktop nav, the second removes the mobile hamburger icon. tuanphan 1 christyprice.com 🇺🇸 Austin, TX US ✅ Get my 100+ item Client Process Checklist for $17. 📔 Flourish Journal for Creative Entrepreneurs - 365 days of prompts 🎥 Watch Circle Live: Hello Income (feat. Christy Price and Jeremy Schwartz) 🎬 Watch It's Not Hard to Say Goodbye: Crafting Client Offboarding from Circle Day 2023 Link to comment
Wolfsilon Posted June 9, 2021 Share Posted June 9, 2021 Hello Andrew, It's actually fairly simple to setup and you won't need to worry about hiding the entire header or having it effect all other pages. To do this, start by creating an un-linked page and fill it will whatever content you want to display to viewers for your 404 Page. After you've completed styling or adding the 404 Page content, save your changes. In the "Advanced Settings" for the page, use the following code in the page in Code Injection field: <style> .header-nav {display: none!important; } .header-burger {display: none!important; } </style> Navigate to Home -> Design -> 404 Page. You'll have an option to select the page we created earlier to be your 404 Page. Select it, save, and boom! You're all set. Hope this helps, -Dan Link to comment
AndrewFreedman Posted June 10, 2021 Author Share Posted June 10, 2021 I don't have a premium or business account, is it possible to do this without the code injection? Link to comment
AndrewFreedman Posted June 10, 2021 Author Share Posted June 10, 2021 Is this possible to do with the basic plan? Link to comment
creedon Posted June 10, 2021 Share Posted June 10, 2021 @AndrewFreedman It appears you solved the issue? tuanphan 1 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
christyprice Posted June 11, 2021 Share Posted June 11, 2021 Yes! You can follow the general steps in this post but use the code provided above. tuanphan 1 christyprice.com 🇺🇸 Austin, TX US ✅ Get my 100+ item Client Process Checklist for $17. 📔 Flourish Journal for Creative Entrepreneurs - 365 days of prompts 🎥 Watch Circle Live: Hello Income (feat. Christy Price and Jeremy Schwartz) 🎬 Watch It's Not Hard to Say Goodbye: Crafting Client Offboarding from Circle Day 2023 Link to comment
AndrewFreedman Posted June 15, 2021 Author Share Posted June 15, 2021 @christyprice this looks like this also required the premium plans, or can I do this with a basic account? Link to comment
christyprice Posted June 15, 2021 Share Posted June 15, 2021 @AndrewFreedman you can workaround using Custom CSS instead of code injection using the steps in the blog post I linked to above. You'll just need to target the collectionID. christyprice.com 🇺🇸 Austin, TX US ✅ Get my 100+ item Client Process Checklist for $17. 📔 Flourish Journal for Creative Entrepreneurs - 365 days of prompts 🎥 Watch Circle Live: Hello Income (feat. Christy Price and Jeremy Schwartz) 🎬 Watch It's Not Hard to Say Goodbye: Crafting Client Offboarding from Circle Day 2023 Link to comment
AndrewFreedman Posted June 17, 2021 Author Share Posted June 17, 2021 @christyprice So I tried doing the code below but I can't figure out how to stop getting a Syntax error /* 404Page */ #collection-60c04a57ab55910fd8381492 { <style> .header-nav {display: none!important; } .header-burger {display: none!important; } </style>} Would you know how I should change the code so it works and its just my header without the nav? Link to comment
creedon Posted June 18, 2021 Share Posted June 18, 2021 @AndrewFreedman Try the following. <style> /* 404Page */ #collection-60c04a57ab55910fd8381492 .header-burger, #collection-60c04a57ab55910fd8381492 .header-nav { display : none !important; } </style> Let us know how it goes. tuanphan 1 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
AndrewFreedman Posted June 18, 2021 Author Share Posted June 18, 2021 Hi @creedon unfortunately that also gives me a syntax error when I copy and paste it into my custom CSS Link to comment
creedon Posted June 19, 2021 Share Posted June 19, 2021 (edited) @AndrewFreedman Since the code you posted had a style tag in it I assumed the CSS was for another place other than Custom CSS. To make the code work there just remove the first and last line. <style> and </style>. Edited June 19, 2021 by creedon 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
AndrewFreedman Posted June 20, 2021 Author Share Posted June 20, 2021 @creedon When I do that I get an error that one of the opening or closing brackets is missing but I can't seem to figure out which one. Would you mind just pasting the code I need please? Link to comment
creedon Posted June 20, 2021 Share Posted June 20, 2021 /* 404Page */ #collection-60c04a57ab55910fd8381492 .header-burger, #collection-60c04a57ab55910fd8381492 .header-nav { display : none !important; } 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
AndrewFreedman Posted June 20, 2021 Author Share Posted June 20, 2021 Ah perfect, thank you so much! creedon 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment