How to Remove Navigation Menus from a Certain Page

Community Forums Forums Design Tips and Tricks How to Remove Navigation Menus from a Certain Page

This topic is: resolved

This topic contains 6 replies, has 2 voices, and was last updated by  Susan 1 year, 7 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #5917

    ryan.collins19
    Participant
    Post count: 4

    Hello everyone!

    Quick question here if anyone can help out.  Any insight is greatly appreciated.

    I use the Streamline Child Theme on my fishing blog and was wondering if there is simple way to not display the navigation menus on just this page here - http://myfishingcapecod.com/membership-options-page/

    I would rather have the content appear directly beneath the header if possible – but just for this one particular page.

    As mentioned above any words of wisdom is greatly appreciated.

    Thanks and take care,

    Ryan

    #5924

    Susan
    Moderator
    Post count: 7991

    Try this:

    remove-the-navigation-menu-from-a-genesis-child-theme

    Place this in your functions.php (replacing page (2) with your page-ID):

    //Remove Menu from page
    add_action('get_header', 'child_remove_genesis_do_nav');
    function child_remove_genesis_do_nav() {
    if (is_page(2)) {
    remove_action('genesis_after_header', 'genesis_do_nav');
    }
    }

    Susan @ Graphically Designing I’d love to customize your website! I tweet!
    I’ve taken up the challenge! – help me answer some of the unanswered posts

    #5977

    ryan.collins19
    Participant
    Post count: 4

    It worked!  Wonderful job Susan.

    Thanks so much for the assistance.

    Take care,

    Ryan

    #5978

    ryan.collins19
    Participant
    Post count: 4

    Oh, actually while I have your attention – is there a way to remove the secondary navigation menu on this page ? - http://myfishingcapecod.com/membership-options-page/

    Your code worked wonderfully to remove the primary navigation menu – just wondering if there is also an easy way to remove the secondary menu.

    Thanks so much for the help,

    Ryan

    #5980

    Susan
    Moderator
    Post count: 7991
    Try this (basically same code as above, but replacing "nav" with "subnav")
    
    //Remove Secondary navigation from page
    add_action('get_header', 'child_remove_genesis_do_subnav');
    function child_remove_genesis_do_subnav() {
    if (is_page(2)) {
    remove_action('genesis_after_header', 'genesis_do_subnav');
    }
    }

    Susan @ Graphically Designing I’d love to customize your website! I tweet!
    I’ve taken up the challenge! – help me answer some of the unanswered posts

    #6019

    ryan.collins19
    Participant
    Post count: 4

    Worked like a charm – thank you!

    #6023

    Susan
    Moderator
    Post count: 7991

    You’re welcome. :)


    Susan @ Graphically Designing I’d love to customize your website! I tweet!
    I’ve taken up the challenge! – help me answer some of the unanswered posts

Viewing 7 posts - 1 through 7 (of 7 total)

The topic ‘How to Remove Navigation Menus from a Certain Page’ is closed to new replies.