WordPress.org

Forums

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

  1. Georgi Petrov
    Member
    Posted 11 months 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 11 months 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 11 months 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 10 months 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 10 months ago #

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

Reply

You must log in to post.

About this Plugin

About this Topic