This plugin hasn’t been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

Custom Classes

Description

The Custom Classes plugin allows you to create custom classes for posts (when post_class() is called) and for the <body> class (when body_class() is called). It creates a meta box on the edit post screen in the admin with two input boxes for adding your custom classes.

Custom post classes are added whenever your theme calls the post_class() function, which is generally whenever a post is shown. Custom body classes are added on the single view of the post whenever your theme calls the body_class() function.

Screenshots

  • Custom classes meta box
  • Body class output in source code

Installation

  1. Upload custom-classes to the /wp-content/plugins/ directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. Go to your user profile in the admin to select whether to prevent password resetting.

FAQ

Why was this plugin created?

I wanted a quick and easy way to add styles to my posts without having to make a tag, create a category, or use post formats. Those solutions are great, but they’re not ideal for every situation. By using a custom class, I have complete control over post styles.

How do I use it?

A meta box named “Classes” gets added to the edit post screen in the admin. From there, you can input a custom post and/or body class for individual posts.

Of course, you actually have to style the class in your theme’s style.css file for anything to actually change on the front end. This plugin just outputs the classes for you. It’s up to you to decide how to use them.

Will this work with other post types?

Certainly. This plugin works with any public post type on your site. It’s not just limited to the “post” post type.

It’s not working!

Most likely, this means your theme isn’t using the appropriate functions (post_class() and body_class()). You’ll need to talk to your theme author to get them to fix this. Or, better yet, use a correctly-coded theme from Theme Hybrid!

Reviews

Perfect

Just what I need – works perfectly running WP version 4.3.1 without any issues at all.

Thanks for a great solution Justin

As the other reviewer, could do with an update to tell users it is still ok to use today.

Read all 9 reviews

Contributors & Developers

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

Contributors

Translate “Custom Classes” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

Version 0.1

  • Plugin launch. Everything’s new!