Skip to content

Instantly share code, notes, and snippets.

@topleague
Last active March 20, 2018 18:59
Show Gist options
  • Save topleague/92fc12bf4ee6a97dda5ed0b490971c85 to your computer and use it in GitHub Desktop.
Save topleague/92fc12bf4ee6a97dda5ed0b490971c85 to your computer and use it in GitHub Desktop.
Inline Mobile Responsive Menu in Genesis
// Add the following to your functions.php
// Source: https://sridharkatakam.com/add-inline-mobile-responsive-menu-genesis-sample/
// Note: Before adding the code, remove or comment out the following line (on Line Number 117)
// add_theme_support( 'genesis-menus', array( 'primary' => __( 'After Header Menu', 'genesis-sample' ), 'secondary' => __( 'Footer Menu', 'genesis-sample' ) ) );
// Rename primary and secondary navigation menus.
add_theme_support( 'genesis-menus', array(
'primary' => __( 'Primary Navigation Menu', 'genesis-sample' ),
'secondary' => __( 'Footer Menu', 'genesis-sample' ) )
);
// Remove Header Right widget area
unregister_sidebar( 'header-right' );
// Reposition the primary navigation menu
remove_action( 'genesis_after_header', 'genesis_do_nav' );
add_action( 'genesis_header', 'genesis_do_nav' );
// Remove Primary Menu's wrap.
add_theme_support( 'genesis-structural-wraps', array(
'header',
// 'menu-primary',
'menu-secondary',
'footer-widgets',
'footer'
) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment