Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
display the primary menu conditionally
//* Remove Primary Nav Menu Conditionally
add_action('template_redirect', 'remove_nav_exclude_blog_page');
function remove_nav_exclude_blog_page() {
if ( !is_archive() && !is_single() && !is_page('blog') )
remove_action('genesis_after_header', 'genesis_do_nav');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment