xpay✦ Commerce
Directory
WooCommerce plugins
Post/Page Specific Custom Code
Post/Page Specific Custom Code
Add custom CSS to individual posts, pages, or WooCommerce products, with optional archive support and a dedicated code editor.
4.6
(42 ratings)Will this break my store?
What the WordPress.org registry says about keeping Post/Page Specific Custom Code running.
Tested to 7.0.2
Tested against the WordPress branch in use today.10 days ago
At least 1.5 releases a year since launch. WordPress.org only lists versions still available for download, so the real number may be higher.7.4
Your host must be running at least this version.5.0
1
A single maintainer. Worth knowing if the plugin is load-bearing for your store.Maintenance & trust
Scored on how Post/Page Specific Custom Code is looked after — not on how many stores run it.
96
out of 100Maintenance
35 / 35WordPress compatibility
20 / 20Support responsiveness
Not enough dataMerchant satisfaction
12 / 15Listing transparency
10 / 10Ratings
4.6
42 ratingsPost/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.
Yes. It is licensed under GPLv2 (or later). If you would like to support the work, you are welcome to donate — thank you!
Highlighting is on by default. To use a plain textarea instead, add this to your theme’s functions.php or a small custom plugin:
add_filter( 'postpage_sccss-highlight_code', '__return_false' );
This affects the Custom Code box on posts, pages, and products, and the default CSS fields on the plugin settings screen. Disabling highlighting uses a plain textarea. On posts, pages, and products, automatic syntax checking still runs for that textarea; the default CSS fields on the plugin settings screen do not have syntax checking.
If your theme or plugin renders products with the standard WooCommerce templates (wc_product_class() / content-product.php), registration is automatic. If you output your own HTML, register the product before rendering it:
do_action( 'postpage_sccss_register_product', $product_id );
You may pass a product ID, a WP_Post, or a WC_Product instance.
Plugin details
Tags on WordPress.org
