• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Hide nav menu for post/body class?

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Hide nav menu for post/body class?

This topic is: resolved

Tagged: menu, navigation

  • This topic has 3 replies, 2 voices, and was last updated 10 years, 8 months ago by Tonya.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • September 1, 2014 at 9:35 pm #122330
    NCKTessa
    Member

    I want to hide the primary navigation menu in Swank on a specific set of pages. Since I may add pages with this requirement in the future, I'm wondering if there's some way to use the Custom Body/Post Class field in the Edit screen (Layout Settings) to quickly designate these pages. I haven't used this function before but I did a little background research and it seems like it might be possible. I'd just like to confirm if this is a good option, as I'm trying to avoid going into the code and adding page/post ID's every time I have a new page for which I want the nav menu hidden.

    http://www.naturalcomfortkitchen.com/services/
    September 1, 2014 at 11:53 pm #122345
    Tonya
    Member

    Hello,

    Yes, you can add a specific class, e.g. hide-nav-menu, which will then load into the body classes. Then in your style.css file, you simply put in the

    body.hide-nav-menu .nav-primary {
    display: none;
    visibility: hidden;
    }

    When hiding the .nav-primary, the border also goes with it, as it's attached to the nav and not the header. Assuming you want to keep that border, I'd advise moving the border to the header:

    1. Go to line 1219 and add the border-bottom

    .site-header {
    background-color: #fff;
    border-bottom: 1px solid #ddd;
    }

    2. Go to line 1470 and comment out the border-bottom:

    .nav-primary {
    background-color: #fff;
    /* border-top: 1px solid #ddd; */
    }

    I hope this helps.

    Cheers,
    Tonya


    Software & Electrical Engineer and Programming Teacher · I’m on a mission to help developers be more awesome.
    Find Me: KnowTheCode.io | @hellofromTonya | Profitable WordPress Developer Bootcamp

    September 2, 2014 at 12:40 pm #122445
    NCKTessa
    Member

    Thanks so much--worked perfect!

    September 2, 2014 at 12:56 pm #122453
    Tonya
    Member

    Excellent. You're welcome.

    If you are happy with the solution, we'd truly appreciate you marking this issue as resolved, as it helps us in finding issues to work on.

    Enjoy your day,
    Tonya 🙂


    Software & Electrical Engineer and Programming Teacher · I’m on a mission to help developers be more awesome.
    Find Me: KnowTheCode.io | @hellofromTonya | Profitable WordPress Developer Bootcamp

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Hide nav menu for post/body class?’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble