- This topic has 5 replies, 2 voices, and was last updated 7 years, 4 months ago by
Tom.
-
AuthorPosts
-
November 21, 2015 at 4:16 pm #154659
William
I’m new here but love this theme and bought the add-ons.
I’m struggling with one simple thing.
I want to hide the main-navigation on single blog posts only – meaning when someone hits the blog they will see all the posts, but if they click the title to go to a single post I only want to show the secondary-navigation.
This is working for hiding it on the main blog page.
.blog .main-navigation {
display: none;
}What would be the CSS to hide the main nav on the single posts?
November 21, 2015 at 4:35 pm #154660Tom
Lead DeveloperLead DeveloperHi there,
Thanks for choosing GP! π
This should work:
.single .main-navigation { display: none; }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentNovember 21, 2015 at 4:52 pm #154663William
Your support here is phenomenal.
Unfortunately that didn’t work and leaves me scratching my head. Seems like it should.
I suppose on each post I can choose to disable the primary navigation using the add-on but I was hoping to not have to remember to do that each time.
Any other suggestions would be appreciated.
November 21, 2015 at 5:10 pm #154667Tom
Lead DeveloperLead DeveloperWeird, any chance you can link me to the site? That CSS should definitely work π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentNovember 21, 2015 at 6:15 pm #154675William
Hi,
I got it working with the CSS you posted. Thank you so much for your help.The problem was that I originally pasted your CSS below some custom .site-info (footer code) in the child CSS.
When I moved it above that code it worked. It didn’t like being below the footer and I should have spotted that the first time. Now I know that custom footer code has to be the last thing in the child CSS which makes sense.
Thanks for this great theme and your excellent support. I’d recommend it to anyone.
November 21, 2015 at 6:23 pm #154676Tom
Lead DeveloperLead DeveloperGreat!
If code doesn’t like being below the footer code, it means there’s an error in the CSS.
Make sure the syntax is correct and it shouldn’t matter where it’s placed π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.