Skip to content

Instantly share code, notes, and snippets.

@tasia53
Forked from kontikidigital/functions.php
Created October 21, 2019 19:02
Show Gist options
  • Select an option

  • Save tasia53/88c85372f3e7a5074244f37d40ec6518 to your computer and use it in GitHub Desktop.

Select an option

Save tasia53/88c85372f3e7a5074244f37d40ec6518 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