Created
November 24, 2014 18:54
-
-
Save mjsdiaz/8611d44701522565fac2 to your computer and use it in GitHub Desktop.
Open Genesis Primary and Secondary Navigation with a Single Responsive Menu Icon - https://amethystwebsitedesign.com/open-genesis-primary-and-secondary-navigation-with-a-single-responsive-menu-icon/
This file contains 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
<?php | |
//* Do NOT include the opening php tag | |
/* Edit (or add) the enqueue line for the responsive menu */ | |
//* Enqueue Scripts | |
add_action( 'wp_enqueue_scripts', 'executive_load_scripts' ); | |
function executive_load_scripts() { | |
wp_enqueue_script( 'executive-responsive-menu', get_bloginfo( 'stylesheet_directory' ) . '/js/responsive-menu.js', array( 'jquery' ), '1.0.0' ); | |
} | |
/* | |
//*Comment out the following in functions.php | |
//* Remove the site description | |
remove_action( 'genesis_site_description', 'genesis_seo_site_description' ); | |
//* Reposition the secondary navigation menu | |
remove_action( 'genesis_after_header', 'genesis_do_subnav' ); | |
add_action( 'genesis_footer', 'genesis_do_subnav', 7 ); | |
//* Reduce the secondary navigation menu to one level depth | |
add_filter( 'wp_nav_menu_args', 'executive_secondary_menu_args' ); | |
function executive_secondary_menu_args( $args ){ | |
if( 'secondary' != $args['theme_location'] ) | |
return $args; | |
$args['depth'] = 1; | |
return $args; | |
}*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment