Archived topic
CSS classes for logged in in / logged out?
1 reply · Started by Joe on May 18, 2020
Hi,
Quick question:
While looking through the support forum I saw that there was a CSS class to target logged in users: .logged-in.
Is there something similar for logged out users? I tried .logged-out but no luck.
I am adding some widgets to the slideout menu and looking to have one appear for logged in members as well as some just for anonymous visitors. And adding display:none is fine for this task.
Failing a CSS class, would php be the best way to achieve this?
Thanks so much! Joe
Hi there,
this CSS:
body:not(.logged-in) {
/* CSS for NOT logged in user */
}
If you want to display the widgets dynamically then you would need a plugin like Content Aware Sidebars.