Founding offer 50% off all plans for the first 100 customers, and your renewal price is locked for life. 74 spots left Claim your spot
Turquoise abstract wavy W logo on a black background
Turquoise abstract wavy W logo on a black background
White WP PowerSuite logo on a black background
White WP PowerSuite logo on a black background

Summarize with AI:

On This Page
Last updated: 24/07/2026

User Role Body Class

Body classes per user role (and guests) for role-based styling on the front end and in admin.

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.

Solid black square
Solid black square
Who is this for?
  • Developers styling UI differently per role
  • Agencies shipping role-based CSS hooks
  • Sites that need guest vs member layout flags

Features

Role body classes
role-{role} for logged-in users.
Guest class
role-guest for logged-out visitors.
Front end and admin
Applies in both contexts.
Zero configuration
Enable and use in CSS.

Use Cases

  • Member vs guest layouts
    Hide/show CSS-driven UI chrome for role-guest vs role-subscriber.
  • Admin styling hooks
    Target role-administrator in admin CSS for internal tools.
  • Editor-only tips
    Show helper banners only when role-editor is present.

Frequently Asked Questions

Related Modules

Turn off selected keyboard shortcuts for certain roles to gently discourage copying or inspection on the front end.
Disabled
Duplicate a menu and all its items in one click from the Menus screen.
Disabled
Dashboard widget with content and user counts, including drafts, published items, and custom types.
Disabled
Auto-unpublish posts after a date you set—set-and-forget for time-limited offers and listings.
Disabled
Content entries that link out to external URLs—handy for curated resources and partner pages.
Disabled
Adds custom CSS classes to the front-end body for easy styling and layout flags—no template edits.
Disabled
Convert content between post, page, and other types from the editor, Quick Edit, or bulk actions.
Disabled
Comments off everywhere—cleaner for brochure sites, landing pages, or catalogs.
Disabled
Generate many similar pages from a CSV template—great for local landing pages and repeatable layouts.
Disabled
Drag and drop to reorder categories, tags, and custom taxonomy terms, then apply that order in widgets, menus, archives, and supported queries.
Disabled
Founding Member Offer 74 of 100 spots left

Before you go, here's what you'd be leaving.

WP PowerSuite launched this month. The first 100 customers get 50% off and keep that renewal price permanently. When the offer closes on 31 August 2026, prices return to $79 / $239 / $399 and stay there.

  • 154 modules, all included on every plan
  • Renewal price locked for life
  • 14-day refund, one email, no questions
See founding pricing
26 founding members so far 22 days left