On This Page
On This Page
User Role Body Class
Overview
Adds body classes based on the current user’s role—role-{role} for logged-in users and role-guest for visitors—on both the front end and in wp-admin. No settings. Useful for role-based CSS without template conditionals. Stacks safely with Custom Body Class and Username Body Class.

- Developers styling UI differently per role
- Agencies shipping role-based CSS hooks
- Sites that need guest vs member layout flags
Features
Role body classes
Guest class
Front end and admin
Zero configuration
Use Cases
- Member vs guest layoutsHide/show CSS-driven UI chrome for role-guest vs role-subscriber.
- Admin styling hooksTarget role-administrator in admin CSS for internal tools.
- Editor-only tipsShow helper banners only when role-editor is present.
Frequently Asked Questions
What does User Role Body Class do in WP PowerSuite?
It adds body classes per user role (and role-guest) on the front end and in admin for role-based styling.
How do I enable User Role Body Class in WP PowerSuite?
Enable the module. There is nothing else to configure.
Who should use User Role Body Class?
Developers and agencies who want role-based CSS hooks without theme PHP conditionals.
Does it expose the username?
No. Use Username Body Class for username/ID classes (with its privacy note).
Is User Role Body Class a free or Pro module in WP PowerSuite?
It is included (free) with WP PowerSuite.

