BACK TO DIRECTORY

Add Custom Post Type Slugs to Admin Body Class

by Aaron T. Grogg

5.0
(1 ratings)

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

Plugin Details

Active Installs
10
Total Downloads
3,021
Version
1.3
Requires WP
3.1
Requires PHP
Tested Up To
4.2.39
Added
2012-02-25
Last Updated
2015-05-15 4:59am GMT

Ratings

5
1
4
0
3
0
2
0
1
0