logged-in, logged-out menu

This topic contains 4 replies, has 3 voices, and was last updated by  Mark 4 years, 7 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #5007

    Mark
    Buyer
    Post count: 6

    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,
    Mark

    #5009

    Guust
    Moderator
    Post count: 29970

    You 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

    #5015

    Mark
    Buyer
    Post count: 6

    Hey 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

    #5032

    Alex Rollin
    Moderator
    Post count: 27815

    Only the menu links that come with UsersWP do the logged in/ logged out thing. Hiding / showing other links isn’t a features of UsersWP.

    #5038

    Mark
    Buyer
    Post count: 6

    I 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

Viewing 5 posts - 1 through 5 (of 5 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket