Skip to content

Instantly share code, notes, and snippets.

@srikat
Last active August 29, 2015 13:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save srikat/8971210 to your computer and use it in GitHub Desktop.
Save srikat/8971210 to your computer and use it in GitHub Desktop.
Show a specific custom menu below existing content in Footer. http://sridharkatakam.com/adding-custom-menu-footer-genesis/
//* Show custom menu in Footer
add_action( 'genesis_footer', 'sk_custom_menu_in_footer' );
function sk_custom_menu_in_footer() {
$class = 'menu genesis-nav-menu menu-footer';
$args = array(
'menu' => 'Footer Menu', // Enter name of your custom menu here
'container' => '',
'menu_class' => $class,
'echo' => 0,
'depth' => 1,
);
$nav = wp_nav_menu( $args );
$nav_markup_open = genesis_markup( array(
'html5' => '<nav %s>',
'xhtml' => '<div id="nav">',
'context' => 'nav-footer',
'echo' => false,
) );
$nav_markup_open .= genesis_structural_wrap( 'menu-footer', 'open', 0 );
$nav_markup_close = genesis_structural_wrap( 'menu-footer', 'close', 0 );
$nav_markup_close .= genesis_html5() ? '</nav>' : '</div>';
$nav_output = $nav_markup_open . $nav . $nav_markup_close;
echo $nav_output;
}
.site-footer .nav-footer a {
border-bottom: none;
padding: 2.8rem 2.4rem 0 2.4rem;
}
@chillybin
Copy link

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment