Reply To: Secondary navigation on mobile question

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

#212408
Tom
Lead Developer
Lead Developer

It might be easier to use CSS:

.secondary-navigation {
    display: none;
}

.blog .secondary-navigation {
    display: block;
}

Otherwise, something like this might work better:

add_action('after_setup_theme', 'remove_nav_exclude_blog_page');
function remove_nav_exclude_blog_page() {
    if ( ! is_home() ) 
        remove_action('generate_after_header', 'generate_add_secondary_navigation_before_header');
}