Move Genesis Nav Menu Before or After Header

Moving navigation menu’s in Genesis is easy.

By default, Genesis includes 2 menu’s.

A primary and a secondary menu.

To move either of these nav menu’s before or after your header area, simply place this php code in your child theme’s functions.php file.

Go to Appearance > Editor > functions.php

Primary Menu

To move your primary menu above your header, paste this code into your child themes  functions file.

/** Move Primary Nav Menu Above Header */

remove_action( 'genesis_after_header', 'genesis_do_nav' );
add_action( 'genesis_before_header', 'genesis_do_nav' );

Secondary Menu

To move your secondary menu above your header, paste this code into your child themes functions file.

/** Move Secondary Nav Menu Above Header */

remove_action( 'genesis_after_header', 'genesis_do_subnav' );
add_action( 'genesis_before_header', 'genesis_do_subnav' );
Move Nav Menu Above Header
Moving Primary or Secondary Nav Menu Before or After Header in Genesis
The menu you choose to move must be active in order to move it.
Genesis Navigation Menus
To move a Primary or Secondary nav menu, it must be selected from the drop down and saved so its active.

The WordPress menu system is easy to customize and highly flexible.

You can also place a search box, social media buttons and other functions in your menu’s.

Related Tutorials


Comments

10 responses to “Move Genesis Nav Menu Before or After Header”

  1. Carlson007 Avatar

    How do I move the secondary menu in altitude pro( which is above the header by default) below the header. Thanks.

    1. Brad Dalton Avatar
      Brad Dalton

      Its in the header by default as you can see in the functions file:
      [code]
      //* Reposition the secondary navigation menu
      remove_action( ‘genesis_after_header’, ‘genesis_do_subnav’ );
      add_action( ‘genesis_header’, ‘genesis_do_subnav’, 5 );
      [/code]

      You can change the hook in the default code from genesis_header to genesis_after_header however you will nee d to modify the CSS as well which is not something i have worked out or written about at this stage.

  2. Jason Weber Avatar
    Jason Weber

    I know the snippet and how Genesis operates, but I’m having a heck of a time accomplishing this effect in the Parallax Pro child theme.

    I also have a custom functions … I can get the primary nav before the header, but then it pushes the header down to where the sidebar is.

    1. Brad Dalton Avatar
      Brad Dalton

      You need to modify the code in your theme as its coded differently.

  3. Humayun Hashmi Avatar
    Humayun Hashmi

    it works…. thanks. Can i make this menu responsive and the other one also?

    1. Brad Dalton Avatar
      Brad Dalton

      They are by default.

  4. Martin Messier Avatar
    Martin Messier

    Thanks, this was really helpful. Sweet and to the point.

  5. Nice tips. Lucky that I found this site, I’m trying to change the position of the primary navigation on my genesis framework.

    Yeah, I’m a newbie in coding. Thanks Brad..

    1. Brad Dalton Avatar
      Brad Dalton

      Hello Rofik

      Did you work it out?

      1. Yes Brad, it worked well. Now I also found the code to add top navigation instead of reposition the primary navigation. And I can add some css code to make the appearance look better.

Leave a Reply

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.