Reduce Navigation Menu to One Level Depth in Genesis
Below is the code to reduce the primary navigation menu to one level depth in Genesis.
add_filter( ‘wp_nav_menu_args’, ‘prefix_generate_primary_menu_args’ );
function prefix_generate_primary_menu_args( $args ){
if( ‘primary’ != $args[‘theme_location’] )
return $args;
$args[‘depth’] = 1;
return $args;
}
reduce-primary-navigation-menu-one-level-depth.php
Below is the code to reduce the secondary navigation menu to one level depth in Genesis.
add_filter( ‘wp_nav_menu_args’, ‘prefix_generate_secondary_menu_args’ );
function prefix_generate_secondary_menu_args( $args ){
if( ‘secondary’ != $args[‘theme_location’] )
return $args;
$args[‘depth’] = 1;
return $args;
}
reduce-secondary-navigation-menu-one-level-depth.php