• 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

Front Page Menu Only

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 › Front Page Menu Only

This topic is: not resolved
  • This topic has 5 replies, 2 voices, and was last updated 9 years, 10 months ago by Brad Dalton.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • July 15, 2015 at 8:26 pm #159518
    sethbahookey
    Member

    All,

    How would I set up a conditional in Genesis to have a different front page menu compared to the rest of my site?

    Thanks,
    Seth

    July 15, 2015 at 9:07 pm #159521
    Brad Dalton
    Participant

    1. You can do this using a custom function with conditional tag

    or

    2. In your front-page.php file you can remove the primary nav menu and then add back another.


    Tutorials for StudioPress Themes.

    July 15, 2015 at 9:22 pm #159525
    sethbahookey
    Member

    Thanks so much Brad! You always come out of left field with a great tutorial that you have created. 😀

    July 19, 2015 at 9:13 am #159809
    sethbahookey
    Member

    Brad,

    It doesn't look like I can target this menu because technically it is a widget in the Right Header widget section. I've spent quite some time on this today and I'm not much closer to a solution.

    I only want a front page menu on the front page and then for the rest of the pages I'll have a standard menu.

    Is there a simple tutorial to this? I haven't been able to find a guide for Genesis specifically on how to do this.

    July 19, 2015 at 9:52 am #159814
    sethbahookey
    Member

    Ok I think I have this figured out, but I don't think the styling is 100% still any suggestions would be greatly appreciated..

    So first thing is first.. I had the menu in the right header widget area. I removed the menu from that and unregistered it first

    
    //* Unregister the right header widget area
    unregister_sidebar( 'header-right' );
    

    Then I had to create secondary menu area as Centric Pro doesn't have that as a default

    
    //* Registering a new menu area
    add_action( 'init', 'register_additional_menu' );
    function register_additional_menu() {
    	register_nav_menu( 'secondary' ,__( 'Secondary Navigation Menu' ));   
    }
    

    Then I had to reposition the primary and secondary nav up into the right hand side of the header area

    
    //* Remove the default hook locations and move into right header
    remove_action( 'genesis_after_header', 'genesis_do_nav' );
    add_action( 'genesis_header', 'genesis_do_nav', 12 );
    
    remove_action( 'genesis_after_header', 'genesis_do_subnav' );
    add_action( 'genesis_header', 'genesis_do_subnav', 12 );
    

    Finally I created a conditional for it to load based on whether it was a front page or standard page

    
    //* Conditionally load menus
    add_action( 'genesis_header', 'front_page_load' );
    function front_page_load() {
    	if ( is_front_page() ) {
    		add_theme_support( 'genesis-menus', array( 'primary' => __( 'Primary Navigation Menu', 'genesis' ) ) );
    	} else {
    		add_theme_support( 'genesis-menus', array( 'secondary' => 'Secondary Navigation Menu', 'container_class' => 'genesis-nav-menu', 'genesis' ) );	
    	}
    }
    

    Then I had to do a whole bunch of style edits to the style sheet :/ It looks alright, but I still think there is a better way to do this.

    July 19, 2015 at 9:05 pm #159847
    Brad Dalton
    Participant

    Excellent effort!

    There are always different ways to code the same solution.

    Note: Your original question did not state you where using the header right widget therefore my answers where not targeting that element.

    Here's my solution for members of WP Sites only http://wpsites.net/wordpress-tips/different-nav-menu-on-front-page/


    Tutorials for StudioPress Themes.

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 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

© 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