logged-in, logged-out menu
This topic contains 4 replies, has 3 voices, and was last updated by Mark 4 months ago.
Tagged: menu items
- AuthorPosts
- August 14, 2019 at 3:21 am #5007
Hello,
please instruct me how to add additional menu items to the logged-out menu. I have only one choice of menu which is the logged in menu. But when logged out the so far correct logged out menu items appear, how can I add to them,
Thank you,
MarkAugust 14, 2019 at 3:43 am #5009You should have a logged-in and logged-out section for UsersWP links, see image.
If you do not have that option, make sure to tick the “UsersWP Endpoints” in Screen Options at Appearance > Menus.Thanks
August 14, 2019 at 8:52 am #5015Hey Guust,
thanks a lot for your prompt reply.
I recall having had a menu option for both, Logged-in and logged-out but when repeated the setup and gave the menu a name those option disappeared.
So let me reset once again without changing the menu name and be done.Thanks
August 14, 2019 at 6:19 pm #5032Only the menu links that come with UsersWP do the logged in/ logged out thing. Hiding / showing other links isn’t a features of UsersWP.
August 14, 2019 at 10:36 pm #5038I read you Alex, thank you.
I came across this snippet on wpbeginner, that allows for two separate menus:
function my_wp_nav_menu_args( $args = '' ) { if( is_user_logged_in() ) { $args['menu'] = 'logged-in'; } else { $args['menu'] = 'logged-out'; } return $args; } add_filter( 'wp_nav_menu_args', 'my_wp_nav_menu_args' );
All good, should you not hear from me again, means it works.
Thank you,
Mark - AuthorPosts
The topic ‘logged-in, logged-out menu’ is closed to new replies, this may be for inactivity, please open a new topic if you have a similar question.