Adds the currently logged in users role (or roles) to the body class in both the front and back end.
As of April 2026, LH Add Roles to Body Class is a WordPress tag plugin with 30 active installations and a 5/5 rating from 1 reviews. It has been downloaded 1.4K+ times in total. Requires WordPress 5.0+ and PHP false+. Available on WordPress.org since 2018. Last updated 3 years ago — may have compatibility concerns. Top alternative: Pages with category and tag.
Ever wanted to style your content differently depending on the role of the logged in user viewing your content?
Well now you can, simply activate the plugin and you are right to go.
Like this plugin? Please consider leaving a 5-star review.
Love this plugin or want to help the LocalHero Project? Please consider making a donation.
| WordPress | 5.0+ requiredTested up to 6.0.11 |
| PHP | false+ required |
1.00 May 20, 2018
Initial release
1.01 June 12, 2019
Bettter code architecture
Plugin data sourced from WordPress.org. Analysis and metrics by PluginSift.