Some users would like to hide the secondary navigation from unregistered visitors and display to logged in users only. This can be done with the following PHP snippet:
add_filter( 'has_nav_menu', 'tu_disable_secondary_nav_logged_out', 10, 2 ); function tu_disable_secondary_nav_logged_out( $has_nav_menu, $location ) { if ( 'secondary' === $location && ! is_user_logged_in() ) { return false; } return $has_nav_menu; }