Add Custom Post Type Slugs to Admin <body> Class
As of April 2026, Add Custom Post Type Slugs to Admin Body Class is a WordPress body plugin with 10 active installations and a 5/5 rating from 1 reviews. It has been downloaded 2.7K+ times in total. Requires WordPress 3.1+ and PHP false+. Available on WordPress.org since 2012. Last updated 10 years ago — may have compatibility concerns. Top alternative: Head & Footer Code.
When in Admin mode, this plug-in adds classes to the <body> tag to let
your CSS know where you are.
For example, if you are viewing the list of all your Posts, you would get this additional class:
edit-list-post
And, when you are editing a Post, something like this:
edit-page-post
Alternatively, for custom posts, for example “movie”, you would see either:
edit-list-movie
or:
edit-page-movie
This allows you to write custom CSS and JS to interact with these varying edit pages within WP.
Please let me know if you have any questions/suggestions/thoughts,
Atg
| WordPress | 3.1+ requiredTested up to 4.2.39 |
| PHP | false+ required |
2015-05-15:
* Tested in 4.2.2, plus added a few FAQs to better explain what this plugin does and why it might be useful
Plugin data sourced from WordPress.org. Analysis and metrics by PluginSift.