Skip to content

Instantly share code, notes, and snippets.

@srikat
Last active August 29, 2015 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save srikat/8e2a0c69d1189643cc90 to your computer and use it in GitHub Desktop.
Save srikat/8e2a0c69d1189643cc90 to your computer and use it in GitHub Desktop.
How to display Secondary Navigation menu in Genesis only on single Posts. https://sridharkatakam.com/how-to-display-secondary-navigation-menu-only-on-single-posts-in-genesis/
// Show the custom menu assigned to Secondary Navigation Menu location only on single Posts
add_action( 'genesis_header', 'sk_show_secondary_navigaton' );
function sk_show_secondary_navigaton() {
if ( is_singular( 'post' ) ) {
return;
}
remove_action( 'genesis_after_header', 'genesis_do_subnav' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment