Can you add CSS class for specific user roles?
-
We need to hide a search bar contained in a DIV, if they are not logged in, OR, if they are logged in as a ‘Subscriber. So it shows only to Admin, Shop Manager, Vendor and one other custom one.
I’ve looked at many options, but none really explain how to do it.
They state you use get_user_role or similar to that, but not how to then state which user roles CANNOT see the DIV.So if the person is not logged in… and then if array(,customer,), then display: none. But I don’t see how to do it. Can anyone help please.
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘Can you add CSS class for specific user roles?’ is closed to new replies.