There are many ways to add Navigation Menu into the Header area in genesis Child Themes. We will discuss couple of them in this article.
Widgets made life easier for newbies. Here’s how to add Navigation Menu via Widget.
1-) Login to your WordPress dashboard
2-) Go to Widgets under Appearance
3-) Drag “Custom Menu” Widget into the Header sidebar.
4-) Select your Desired Menu into the drop down and hit Save, you’re done 🙂
Sometimes you need to move the Menu from it’s place to a custom location. In my case, I had to do that before the Header (title/logos, widget etc).
Here’s my code snippet for that:
/* Do NOT include the opening php tag
Reposition the primary navigation menu */
remove_action( 'genesis_after_header', 'genesis_do_nav' );
add_action( 'genesis_before_header', 'genesis_do_nav' );
Here’s the explanation of above code:
The first line: remove_action(….); unhook the Primary Menu from Genesis After Header Hook while the second line code add it into the before header.
You can add the Primary Menu anywhere you want by changing the Hook name into the above add_action(..) function.