In the members-only forum, a user wrote:
Hello Sridhar,
I would like to ask how to best add a secondary menu (similar to the one in the previous sample theme) whilst still keeping the footer menu. So, three menus in total— Primary navigation in Header. Secondary after the header, and tertiary menu in the footer.
Thank you,
Best,
-K
This tutorial provides the steps to register a custom footer
menu location and display the menu assigned to that location in the site footer with the secondary nav menu appearing below the site header in Genesis Sample 2.6.0.
Appearance > Menus:
Site Header (primary menu) and secondary menu:
Footer menu:
We shall
- add `footer` to the array that adds support for genesis menus
- echo the footer nav menu in site footer
- add `genesis-nav-secondary` ID to .nav-secondary and `genesis-nav-footer` to .nav-footer
- add skip links for secondary and footer navigation for accessibility
- reduce footer navigation menu to one level depth
- combine primary and secondary
- adjust secondary nav margin top to compensate for sticky header height
Step 1
Edit Genesis Sample's functions.php.
Replace
a)
/**
* Defines responsive menu settings.
*
* @since 2.3.0
*/
function genesis_sample_responsive_menu_settings() {
$settings = array(
'mainMenu' => __( 'Menu', 'genesis-sample' ),
'menuIconClass' => 'dashicons-before dashicons-menu',
'subMenu' => __( 'Submenu', 'genesis-sample' ),
'subMenuIconClass' => 'dashicons-before dashicons-arrow-down-alt2',
'menuClasses' => array(
'combine' => array(
'.nav-primary',
),
'others' => array(),
),
);
return $settings;
}
with
To view the full content, please sign up for the membership.
Already a member? Log in below or here.
As always, thank you so much Sridhar . 🙂
Great got it working . Thanks! One quick question: How would you place the secondary menu before (above) the primary menu?