Realsmart Help

โ† Realsmart Help

Custom Classes

Add custom CSS class names to individual posts and pages for targeted styling.


Overview

Custom Classes adds a simple meta box to posts and pages where you can enter additional CSS class names. These classes are added to the page's <body> tag, allowing your theme or Smart CSS to style specific pages differently.

Category slugs can also be automatically added to the body class when enabled.


Getting Set Up

No configuration needed. The Custom Classes box appears when editing any post or page.


Features

Per-page CSS classes

Where to find it: Posts/Pages editor โ†’ Custom Classes meta box

Field What it does
CSS class names Space-separated class names added to the page body tag

Example: Enter highlight-page term-dates to add those classes to the body element.

Category slugs from the post's categories are also appended to the body class automatically.


Tips & Best Practice

  • Use descriptive class names (e.g. governors-page, no-sidebar).
  • Combine with Smart CSS to write styles targeting specific pages.
  • Your theme must call body_class() in its templates for classes to appear.

Last updated: 9 July 2026 ยท Plugin version: 1.0

Was this helpful?