Skip to content

Instantly share code, notes, and snippets.

@studiopress
Last active January 14, 2017 02:44
Show Gist options
  • Save studiopress/5700303 to your computer and use it in GitHub Desktop.
Save studiopress/5700303 to your computer and use it in GitHub Desktop.
Genesis primary/secondary navigation.
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Reposition the primary navigation menu
remove_action( 'genesis_after_header', 'genesis_do_nav' );
add_action( 'genesis_before_header', 'genesis_do_nav' );
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Reposition the secondary navigation menu
remove_action( 'genesis_after_header', 'genesis_do_subnav' );
add_action( 'genesis_before_header', 'genesis_do_subnav' );
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Unregister primary navigation menu
add_theme_support( 'genesis-menus', array( 'secondary' => __( 'Secondary Navigation Menu', 'genesis' ) ) );
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Unregister secondary navigation menu
add_theme_support( 'genesis-menus', array( 'primary' => __( 'Primary Navigation Menu', 'genesis' ) ) );
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Unregister primary/secondary navigation menus
remove_theme_support( 'genesis-menus' );
@cconover
Copy link

Are the contents of unregister-primary.php and unregister-secondary.php reversed, or am I missing something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment