Last active
August 29, 2015 13:56
-
-
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/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//* 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; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.site-footer .nav-footer a { | |
border-bottom: none; | |
padding: 2.8rem 2.4rem 0 2.4rem; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks