Different menus for logged users
-
I need have different menus for logged users, but I have a three menus:
logged-in-menu
logged-out-menu
for-all-users-menuI put this code into function.php:
function my_wp_nav_menu_args( $args = '' ) { if( is_user_logged_in() ) { $args['menu'] = 'logged-in-menu'; } else { $args['menu'] = 'logged-out-menu'; } return $args; } add_filter( 'wp_nav_menu_args', 'my_wp_nav_menu_args' );
But I can’t see third menu – for-all-users-menu in a footer. Istead of this I see:
– logged-in-menu when I am logged in or
– logged-out-menu when I am logged outWhen I remove above code from functions.php the third menu is properly in a footer.
So the question is: what should I do in order to see the third menu for all users (never mind logged or not).
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Different menus for logged users’ is closed to new replies.