WordPress.org

Forums

Menu Item Visibility Control
Hide Log Out for non log in users (5 posts)

  1. Georgi Petrov
    Member
    Posted 1 year ago #

    Hi, can you tell me how to hide 'log out' from users who are not log in in the site. I need them to see only only log in or register but when they log in to see only log out. Hope this make sense.

    Thanks

    https://wordpress.org/plugins/menu-items-visibility-control/

  2. Carrie Dils
    Member
    Posted 1 year ago #

    Hi,
    You can use the is_user_logged_in() conditional.

    http://codex.wordpress.org/Function_Reference/is_user_logged_in

    Cheers,
    Carrie

  3. Georgi Petrov
    Member
    Posted 1 year ago #

    Hi, I use this but then log out disappear when user is logged in. The idea is log out to be visible for log in users and not visible for people who just browse the site but are not logged in. Hope this make sense. You can visit http://www.hotpsdzone.com and see that on top bar I have log out option. I want to hide it for guest users.

    Thanks

  4. tuttall
    Member
    Posted 1 year ago #

    I've been able to make a log out button that dissapears for guest users on my site, try putting !is_user_logged_in(). This way, if a user is not logged in, they will not see the log out menu item.

  5. Georgi Petrov
    Member
    Posted 1 year ago #

    Hi thanks for that. I try and didn't work. I presume is something to do with my theme.
    Thanks again.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Menu Item Visibility Control
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic