• 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

Altitude Pro, remove Header Menu from all but Front Page

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 › Altitude Pro, remove Header Menu from all but Front Page

This topic is: not resolved

Tagged: altitude, navigation, primary_nav

  • This topic has 4 replies, 2 voices, and was last updated 9 years, 3 months ago by carasmo.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • October 11, 2016 at 12:27 pm #194527
    jdcohan
    Member

    I'm using Altitude Pro. I have placed the "Scroll to Front Page Sections" custom links in the "Header Menu" (primary nav), as per the demo. (I'm using the "Before Header" menu location for a menu that links to static pages.)

    I want to suppress the "Header Menu" location on all pages EXCEPT the front page. (In fact, FWIW, it seems to me this should be the default behavior; but maybe that's just me...)

    I was able to accomplish this via CSS, but I'm looking for a better solution - one that actually removes the Header Menu from all but the front page, using code, rather than hiding it using CSS. I've tried a few StudioPress snippets, but I'm apparently not doing it right.

    BTW, my preference is to put my code in a "functions.php" file in the mu-plugins directory. This could be significant with respect to priority values in add/remove_action calls.

    Would appreciate any help on this.

    Jeff Cohan

    October 11, 2016 at 4:13 pm #194543
    carasmo
    Participant

    So you are not using the primary menu on the home page, but the before header menu (the secondary nav) and you want to remove the this primary nav on the front-page.php only?

    If you look in functions.php you'll see where it was added and the priority, lines 51-53 in a default install.

    Then in front-page.php you can add this outside of all other functions.

    remove_action( 'genesis_header', 'genesis_do_nav', 12 );


    Genesis Theme Customization and Help

    October 11, 2016 at 4:18 pm #194545
    carasmo
    Participant

    you can add this code inside a plugin as you mentioned:

    function prefix_remove_primary_nav_frontpage() {
    
            if ( ! is_front_page() ) return; // exit early if not front page
            remove_action( 'genesis_header', 'genesis_do_nav', 12 );
    
    }
    add_action( 'genesis_before', 'prefix_remove_primary_nav_frontpage' );

    Genesis Theme Customization and Help

    October 12, 2016 at 6:12 am #194579
    jdcohan
    Member

    Thank you, @carasmo.

    What I want to do is remove the nav element from all pages EXCEPT the home page.

    Your code confirmed that what I had tried was ALMOST correct. (Almost, because I didn't include parens in is_front_page.)

    Here's what I had - very similar to yours -which now works:

    add_action( 'genesis_header', 'nwb_remove_home_menu', 12);
    function nwb_remove_home_menu() {
    	if ( is_front_page() ) { 
    		return;
    	}
    	remove_action('genesis_after_header', 'genesis_do_nav');
    }
    
    October 12, 2016 at 10:40 am #194591
    carasmo
    Participant

    Great! Please mark this topic resolved.

    Thanks!


    Genesis Theme Customization and Help

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

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

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 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