Skip to content

Instantly share code, notes, and snippets.

@kontikidigital
Created October 23, 2014 11:32
Show Gist options
  • Save kontikidigital/9be198e2aa77af24cc51 to your computer and use it in GitHub Desktop.
Save kontikidigital/9be198e2aa77af24cc51 to your computer and use it in GitHub Desktop.
Create a Footer or tertiary Menu
<?php
//do not add in opening php tag
/**
* Add in Footer or Tertiary Menu
*
* @package Genesis Teriary Menu
* @author Neil Gee
* @link http://coolestguidesontheplanet.com/add-footer-menu-genesis-child-theme/
* @copyright (c)2014, Neil Gee
*
* To uniquely style the new menu, just use the .menu-tertiary class and make some CSS changes in the style.css file.
*/
//Footer Menu
function themprefix_footer_menu () {
echo '<div class="footer-menu-container">';
$args = array(
'theme_location' => 'tertiary',
'container' => 'nav',
'container_class' => 'wrap',
'menu_class' => 'menu genesis-nav-menu menu-tertiary',
'depth' => 1, /*Change to 0 for displaying dropdowns*/
);
wp_nav_menu( $args );
echo '</div>';
}
add_theme_support ( 'genesis-menus' , array ( 'primary' => 'Primary Navigation Menu' , 'secondary' => 'Secondary Navigation Menu' ,'tertiary' => 'Footer Navigation Menu' ) );
add_action( 'genesis_before_footer', 'themprefix_footer_menu' ); /*position the menu elsewhere by changing the hook location*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment