There’s different ways and locations you can display navigation menu’s anywhere in Genesis.
With Genesis its very easy as all you need to do:
- Create a new nav menu or use an existing one
- Add code to your child themes functions.php file
Create A Navigation Menu
Go to Appearance > Menu’s and create a new menu.
Select the menu in your Theme Locations.
You’ll also need to go to your Genesis Theme Settings and enable the Primary or Secondary Menu depending on which you want to display in your footer area. If you haven’t already done so.
CODE
Simply paste one of these code snippets into your child themes functions.php file.
Choose from before, after or in replace of your footer.
Display Second Nav Menu After Footer
/** secondary nav menu after footer */
remove_action( 'genesis_after_header', 'genesis_do_subnav' );
add_action( 'genesis_after_footer', 'genesis_do_subnav' );
Remove Footer & Display Second Nav Menu
/** secondary nav menu in footer*/
remove_action( 'genesis_after_header', 'genesis_do_subnav' );
add_action( 'genesis_footer', 'genesis_do_subnav' );
Display Second Nav Menu Before Footer
/** secondary nav menu before footer*/
remove_action( 'genesis_after_header', 'genesis_do_subnav' );
add_action( 'genesis_before_footer', 'genesis_do_subnav' );
Display Primary Nav Menu After Footer
/** Primary nav menu after footer */
remove_action( 'genesis_after_header', 'genesis_do_nav' );
add_action( 'genesis_after_footer', 'genesis_do_nav' );
Remove Footer & Display Primary Nav Menu
/** Primary nav menu in footer */
remove_action( 'genesis_after_header', 'genesis_do_nav' );
add_action( 'genesis_footer', 'genesis_do_nav' );
Display Primary Nav Menu Before Footer
/** Primary nav menu before footer */
remove_action( 'genesis_after_header', 'genesis_do_nav' );
add_action( 'genesis_before_footer', 'genesis_do_nav' );
Displaying Nav Menus Using Genesis Simple Hooks Plugin
You can also paste this code into any hook area using (Genesis Simple Hooks Plugin) you want to display your nav menu.
Display Nav Menu Based On Conditions
You may need to also add a conditional statement if you don’t want the menu displayed in your archive pages.
The conditional tag depends on the location but you won’t need to add one if its the footer or header area’s.
Using conditional tags enables you to display your nav menu anywhere there’s a hook but also depending on certain conditions like:
- Only on the home page is_home ()
- Only on single posts is_single ()
- Only on a specific page is_page ( 42 )
I’ll be writing more about how to display a custom navigation menu using conditional tags shortly.
Was This Tutorial Helpful?