Thank you for your answer David.
1) The secondary menu must be visible to logged in users, so it is not suitable.
2) I don’t understand how to do it…
But never find… I finally found the solution in your documentation : https://docs.generatepress.com/article/show-secondary-navigation-to-logged-in-users-only/ :
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;
}
I put this code in the theme functions.php file and it works perfectly.
Best regards
Gilles