跳到内容

Post/Page Specific Custom Code

v0.3.1

Łukasz Nowicki · 2016年12月16日 上架

Add custom CSS to individual posts, pages, or WooCommerce products, with optional archive support and a dedicated code editor.

正在使用
6,000+
评分
4.6 / 5
累计下载
8.6 万
最近更新
2026年7月23日
42 条评价需要 WordPress 5.0+已测试到 7.0.9PHP 7.4+

截图

If you do not see the Custom Code panel, open Screen Options and make sure "Custom Code" is checked.
If you do not see the Custom Code panel, open Screen Options and make sure "Custom Code" is checked.
Enter CSS that applies to your post, page, or product. You can limit it to the single view only.
Enter CSS that applies to your post, page, or product. You can limit it to the single view only.
Plugin settings screen.
Plugin settings screen.

Post/Page Specific Custom Code lets you add custom CSS to individual posts, pages, or WooCommerce products. A dedicated box on the edit screen is where you write your CSS. You can also choose whether it should load only on the single view or on archive-style views as well.

The meta box appears below the content editor for posts, pages, and products. Enter your CSS there and decide whether it applies only on the single view or also on archive-style views (blog/category listings, the WooCommerce shop and product categories/tags). Product CSS also loads on a best-effort basis for products rendered through standard WooCommerce loop templates outside the main query (for example the [products] shortcode). CSS discovered only after the page head may be printed in the footer. Custom product markup that skips WooCommerce templates needs a small integration hook. Products injected only via AJAX or infinite scroll are not covered.

CSS fields use a code editor with syntax highlighting by default. You can turn highlighting off with a filter if you prefer a plain textarea (for example on slower machines).

Requirements

This plugin requires WordPress 5.0 or later (please keep WordPress up to date) and PHP 7.4 or later on your server.

Plums

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

导航

说明

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

© 2026 Plums