跳到内容

Add Custom Post Type Slugs to Admin Body Class

v1.3

Aaron T. Grogg · 2012年2月25日 上架

Add Custom Post Type Slugs to Admin <body> Class

正在使用
10+
评分
5.0 / 5
累计下载
3,131
最近更新
2015年5月15日
1 条评价需要 WordPress 3.1+已测试到 4.2.39

贡献者

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

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums