Title: Custom Body Class
Author: Andrei Lupu
Published: <strong>July 26, 2015</strong>
Last modified: July 27, 2025

---

Search plugins

![](https://s.w.org/plugins/geopattern-icon/wp-custom-body-class.svg)

# Custom Body Class

 By [Andrei Lupu](https://profiles.wordpress.org/euthelup/)

[Download](https://downloads.wordpress.org/plugin/wp-custom-body-class.0.7.5.zip)

 * [Details](https://wordpress.org/plugins/wp-custom-body-class/#description)
 * [Reviews](https://wordpress.org/plugins/wp-custom-body-class/#reviews)
 *  [Installation](https://wordpress.org/plugins/wp-custom-body-class/#installation)
 * [Development](https://wordpress.org/plugins/wp-custom-body-class/#developers)

 [Support](https://wordpress.org/support/plugin/wp-custom-body-class/)

## Description

You can use this plugin to add a unique CSS class to your pages or posts.

#### Demo

[TasteWP](https://tastewp.com/) has prepared a quick WordPress instance with this
plugin, so you can give it a try [in this demo](https://demo.tastewp.com/wp-custom-body-class)

#### Responsiveness

There’s a way to add a class to appear only on mobile devices. You can do that by
simply adding `mobile-` on the front of
 the class. For example, if you want to 
have the class “car” for mobile side, you need to use “mobile-car”.

#### Support me

If you find this plugin helpful, or you just want to send me a coffee here are the
ways:

 * Use the Github Sponsor button
 * [Ko-fi](https://ko-fi.com/thelup)
 * Watch me coding on [twitch.tv/thelup](https://www.twitch.tv/thelup/)
 * Or simply visit my site [lup.dev](https://a.lup.dev/) and make those analytics
   ring the bells.

## Installation

 1. Install Custom Body Class either via the WordPress.org plugin directory, or by 
    uploading the files to your `/wp-content/plugins/` directory
 2. After activating Custom Body Class go to any edit page and see the Custom Body 
    Class metabox in the right sidebar.

## Reviews

![](https://secure.gravatar.com/avatar/e4f5880ec264d886b738617c702a88d90d6520b64b82be19bb6bcb1222d33bad?
s=60&d=retro&r=g)

### 󠀁[Useful plugin](https://wordpress.org/support/topic/useful-plugin-1102/)󠁿

 [bzle](https://profiles.wordpress.org/bzle/) August 8, 2025

Very handy to have a field for adding classes to a page

![](https://secure.gravatar.com/avatar/d151d1d91e34373d2a7cdffb08f42d78224fa0164c7ff60b5f8ff444fcf7e679?
s=60&d=retro&r=g)

### 󠀁[Fabulously useful plugin](https://wordpress.org/support/topic/fabulously-useful-plugin/)󠁿

 [Anonymous User 652281](https://profiles.wordpress.org/anonymized-652281/) November
21, 2022

Exactly what I needed. Work perfectly. Thanks for making this.

![](https://secure.gravatar.com/avatar/0df465d2de6cecad9a6d56f745689e0e7662bea2eb5865955f50548acd0be415?
s=60&d=retro&r=g)

### 󠀁[Works like a charm](https://wordpress.org/support/topic/works-like-a-charm-1856/)󠁿

 [mreall](https://profiles.wordpress.org/mreall/) January 19, 2021

Tested successfully on WordPress 5.6. Made it a lot easier to manage css for similar
pages.

![](https://secure.gravatar.com/avatar/f01f7251292e81367fadc5268878d76d09665f0d4b90ed24375adbee3f3f24bf?
s=60&d=retro&r=g)

### 󠀁[Great](https://wordpress.org/support/topic/great-11259/)󠁿

 [wzshop](https://profiles.wordpress.org/wzshop/) April 24, 2020

Just what I needed

![](https://secure.gravatar.com/avatar/2225189e8044df879b3326c1371fcd0b2ce35b545f212ee06d580bab8c273539?
s=60&d=retro&r=g)

### 󠀁[Nice](https://wordpress.org/support/topic/nice-3247/)󠁿

 [cvladan](https://profiles.wordpress.org/cvladan/) January 28, 2020

You should be able to enter any valid class-name, including characters like % (percentage)
etc. They are useful for some purposes.

![](https://secure.gravatar.com/avatar/5a667e5610ba693a83f513e2245f747282ead263149c6070111c62d013addf49?
s=60&d=retro&r=g)

### 󠀁[Essential](https://wordpress.org/support/topic/essential-225/)󠁿

 [yodastudio](https://profiles.wordpress.org/yodastudio/) June 22, 2019

Very useful and easy to use plugin, it helps a lot in page customization. And it
works with multisite too. Thanks.

 [ Read all 21 reviews ](https://wordpress.org/support/plugin/wp-custom-body-class/reviews/)

## Contributors & Developers

“Custom Body Class” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ Andrei Lupu ](https://profiles.wordpress.org/euthelup/)

“Custom Body Class” has been translated into 2 locales. Thank you to [the translators](https://translate.wordpress.org/projects/wp-plugins/wp-custom-body-class/contributors)
for their contributions.

[Translate “Custom Body Class” into your language.](https://translate.wordpress.org/projects/wp-plugins/wp-custom-body-class)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/wp-custom-body-class/),
check out the [SVN repository](https://plugins.svn.wordpress.org/wp-custom-body-class/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/wp-custom-body-class/)
by [RSS](https://plugins.trac.wordpress.org/log/wp-custom-body-class/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 0.7.5

 * Fix: Fixed a notice about textdomain loaded too early.
 * Update: Check compatibility with WordPress 6.8.2 and PHP 8.3.*

#### 0.7.4

 * Update: Check compatibility with WordPress 6.7.1 and PHP 8.2.*

#### 0.7.3

 * Update: Check compatibility with 6.0.0.

#### 0.7.2

 * Fix: Properly instantiate plugin default settings.

#### 0.7.1

 * Update: Check for nonce existence on settings page form.

#### 0.7.0

 * Update: Better escapes for the plugin’s settings page.
 * Update: Modified textdomain as the plugin’s name.
 * Add: Nonce verification for the plugin’s settings page.

#### 0.6.0

 * Fix: Now the metabox will load even if the Autocomplete feature is off.
 * Add: The capability to restrict the metabox for Administrators only.

#### 0.5.0

 * Add an option for a global class

#### 0.4.0

 * Add support for classes on mobile devices

#### 0.3.0

 * Add a tag selector with autocomplete for all post types

#### 0.0.3

 * Quick archives fix

#### 0.0.2

 * Small fixes, and typos

#### 0.0.1

 * We are on

## Meta

 *  Version **0.7.5**
 *  Last updated **9 months ago**
 *  Active installations **10,000+**
 *  WordPress version ** 5.2.0 or higher **
 *  Tested up to **6.8.5**
 *  Languages
 * [Dutch](https://nl.wordpress.org/plugins/wp-custom-body-class/), [English (US)](https://wordpress.org/plugins/wp-custom-body-class/),
   and [German](https://de.wordpress.org/plugins/wp-custom-body-class/).
 *  [Translate into your language](https://translate.wordpress.org/projects/wp-plugins/wp-custom-body-class)
 * Tags
 * [body](https://wordpress.org/plugins/tags/body/)[class](https://wordpress.org/plugins/tags/class/)
   [css](https://wordpress.org/plugins/tags/css/)[custom](https://wordpress.org/plugins/tags/custom/)
 *  [Advanced View](https://wordpress.org/plugins/wp-custom-body-class/advanced/)

## Ratings

 5 out of 5 stars.

 *  [  21 5-star reviews     ](https://wordpress.org/support/plugin/wp-custom-body-class/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/wp-custom-body-class/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/wp-custom-body-class/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/wp-custom-body-class/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/wp-custom-body-class/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/wp-custom-body-class/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/wp-custom-body-class/reviews/)

## Contributors

 *   [ Andrei Lupu ](https://profiles.wordpress.org/euthelup/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/wp-custom-body-class/)