Remove logout when already logged out and remove login when already logged in

This topic contains 3 replies, has 2 voices, and was last updated by  Alex Rollin 4 years, 5 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #518042

    rigots
    Lifetime Member
    Post count: 275

    How do I Remove logout menu button when already logged out? and how do I remove the login menu button when already logged in?

    I used custom links to add the login, logout and profile buttons to my main menu as follows:
    Login: https://www.mywebsite.com/wp-login.php
    Logout: https://www.mywebsite.com/wp-login.php?action=logout
    Profile: https:/www.mywebsite.com/profile

    The about three buttons “Login, Logout and Profile” are always showing event if the user is logged int our or logged out.

    But when the users visits my website and they have not logged in, I do don want to show the “Logout” menu because they are not event logged in yet. I also don’t want to show the “Profile” menu because the don’t have access to their profile til they login.

    And when the users are already logged in I don’t want to show the “Login” menu button because they are already logged in.

    How can I do this?

    Thank you.

    #518103

    Alex Rollin
    Moderator
    Post count: 27815

    Hello,

    If you are using UsersWP, it comes with links that work like that. Once you have installed it, visit the menu options and look for the UsersWP navigation.

    #518396

    rigots
    Lifetime Member
    Post count: 275

    That is sad that I have to show the “Logout” option when I am already logged out and show “Login” option when I am already logged in.

    I had asked for a better way to log in and this what you guys recommended to use UsersWP, oh well, I guess I just have to live with that.

    When I click on the “logout” link I get popup message that says “Do you really want to log out?”. Is there a way to avoid this popup and just get logged out without having to confirm the logout?

    Thanks,

    #518524

    Alex Rollin
    Moderator
    Post count: 27815

    For support with UsersWP you can post here: https://userswp.io/support/

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

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

Open Support Ticket