Reply To: Secondary navigation on mobile question

Home Forums Support Secondary navigation on mobile question Reply To: Secondary navigation on mobile question

#212352
Jessica

This worked like a CHARM!!!! Thank you for posting.

Now I am trying to solve this: Conditionally Remove Secondary Nav Menu from all pages EXCEPT the blog.

I am this far but it’s breaking my site:

add_action('template_redirect', 'remove_nav_exclude_blog_page');
function remove_nav_exclude_blog_page() {
if ( !is_page('blog') ) 
    remove_action('generate_after_header', 'generate_add_secondary_navigation_before_header',);
}

I have already successfully repositioned the secondary nav into place… just don’t want it showing anywhere except the blog. What am I mucking up?