Black Friday Sale! Get up to $40 off GP Premium!Learn more

[Resolved] Hide main-navigation on single post only

Home Forums Support Hide main-navigation on single post only

  • This topic has 5 replies, 2 voices, and was last updated 5 years ago by Tom.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #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?

    #154660
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Thanks for choosing GP! 🙂

    This should work:

    .single .main-navigation {
        display: none;
    }
    #154663
    William

    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.

    #154667
    Tom
    Lead Developer
    Lead Developer

    Weird, any chance you can link me to the site? That CSS should definitely work 🙂

    #154675
    William

    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.

    #154676
    Tom
    Lead Developer
    Lead Developer

    Great!

    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 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.