Avada Forums Community Forum Hide a column if user is registered

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • bcerron
    Participant
    Post count: 4

    I found the solution with CSS, just in case somebody need also.

    
    body:not(.logged-in) .disconnect-user {
        display: none !important;
    }
    
    body:not(.logged-out) .connect-user {
        display: none !important;
    }
    

    Just apply to the column you want to hide depending the if the user is connected or not.

    ladolphinconnection
    Participant
    Post count: 2

    There’s no “logged-out” class when logged out of WordPress. But you can make the condition depending on the presence or not of “logged-in”. This worked for me:

    .logged-in .hide_from_logged_in_users {
        display: none !important;
    }
    body:not(.logged-in) .hide_from_logged_out_users {
        display: none !important;
    }
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.