| 开发者 | syedkamruzzaman |
|---|---|
| 更新时间 | 2025年10月10日 05:04 |
| PHP版本: | 6.7 及以上 |
| WordPress版本: | 6.8 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
<body> classes—safely prefixed—on any Page, Post, CPT, or WooCommerce view (Shop, Cart, Checkout, My Account) with zero theme edits.
I created Custom Class Add On Page as a simple way to manage <body> classes with a safe ccaop_ prefix. Choose the target (Page, Blog page, Single Post, CPT archive/single, or a specific CPT item), save, and the class is injected via the body_class filter. Clean code, lightweight implementation, and solving real problems are the focus. Collaboration and feedback are welcome.
Highlights
ccaop_) prevents conflicts.body_class filter only—no front-end bloat./wp-content/plugins/.No. It only appends your custom class to the <body> element via WordPress’s body_class filter.
Yes. Add as many mappings (class → location) as you need. Each shows up in the table where you can delete them later.
By design, the Blog page is managed under Post → Blog page to avoid confusion with static pages.
Yes—Shop (product archive), Cart, Checkout (and its endpoints), and My Account are supported.
Your input is sanitized and auto-prefixed with ccaop_ (e.g. container → ccaop_container) to keep it safe and unique.