Hi, today wordpress best plugin team will share a tips of how to customize your menu in your wordpress theme. Some times you hope your logged in users have more sub menu, right? It is very easy.
1: you can just register your menu in your customized function:
register_nav_menus( array( 'users' => __('Vistor Menu'), 'clients' => __( 'Client Menu' ) ) );
2: You can show your menu via wp_nav_menu function
3: if users not logged in you can show first menu, else show another menu like this:
if (!(is_user_logged_in())) { wp_nav_menu(array('theme_location' => 'users', 'menu_id' => 'menu')); } else { wp_nav_menu(array('theme_location' => 'clients', 'menu_id' => 'visitor')); }; ?>