Avada › Forums › Community Forum › Hide a column if user is registered
Tagged: login, conditionals, user
Viewing 3 posts - 1 through 3 (of 3 total)
-
AuthorPosts
-
Is this possible? I would like to show the user login element, but once the user is logged in the website, I would like to show another element instead of the common dashboard that you see when you are loggin.
Thanks
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.
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; }
-
AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Was this topic helpful?