Genesis Sample child theme has code to rename secondary navigation location as Footer Menu and show the menu assigned to that location inside the footer.
//* Rename primary and secondary navigation menus
add_theme_support( 'genesis-menus' , array( 'primary' => __( 'After Header Menu', 'genesis-sample' ), 'secondary' => __( 'Footer Menu', 'genesis-sample' ) ) );
and
add_action( 'genesis_footer', 'genesis_do_subnav', 5 );
We can instead register a custom footer
theme location and display the menu assigned to it above the footer content like so:
// Add footer theme location
add_theme_support( 'genesis-menus' , array(
'primary' => __( 'After Header Menu', 'genesis-sample' ),
'secondary' => __( 'Secondary Navigation Menu', 'genesis-sample' ),
'footer' => __( 'Footer Navigation Menu', 'genesis-sample' )
) );
// Add typical attributes for footer navigation elements.
add_filter( 'genesis_attr_nav-footer', 'genesis_attributes_nav' );
// Display Footer Navigation Menu above footer content
add_action( 'genesis_footer', 'sk_do_footernav', 5 );
/**
* Echo the "Footer Navigation" menu.
*
* @uses genesis_nav_menu() Display a navigation menu.
* @uses genesis_nav_menu_supported() Checks for support of specific nav menu.
*/
function sk_do_footernav() {
//* Do nothing if menu not supported
if ( ! genesis_nav_menu_supported( 'footer' ) )
return;
$class = 'menu genesis-nav-menu menu-footer';
if ( genesis_superfish_enabled() ) {
$class .= ' js-superfish';
}
genesis_nav_menu( array(
'theme_location' => 'footer',
'menu_class' => $class,
) );
}
This frees up the secondary menu location for display in other locations (like below the header) if needed. Also with Genesis Simple Menus plugin it will be quite easy to have page/post specific secondary navigation – something which wouldn’t be possible if the secondary menu is being used as footer menu.
Source: genesis/lib/structure/menu.php
PHP code goes in child theme’s
functions.php
unless otherwise mentioned.Hello Sridhar, thanks for your respond.
I got your point and has solved.. Can you please remove my comment as I am getting 2602 Backlinks from website.
Best regards.