Examples
Use the following tables to better understand how to name your assets or as a quick reference for various common asset filenames.
CSS
Content Targeting | Asset Filename |
---|---|
Every WordPress page | type-page.css |
A WordPress page with slug "home" | type-page-slug-home.css |
Every WordPress post | type-post.css |
Every WooCommerce product | type-product.css |
A specific WooCommerce product with slug "product1" | type-product-slug-product1.css |
WooCommerce shop page | archive-type-product.css |
WooCommerce product category page | tax-product_cat.css |
WooCommerce checkout page with slug "checkout" | type-page-slug-checkout.css |
WooCommerce account page with slug "my-account" | type-page-slug-my-account.css |
JavaScript
Content Targeting | Asset Filename |
---|---|
Every WordPress page | type-page.js |
A WordPress page with slug "home" | type-page-slug-home.js |
Every WordPress post | type-post.js |
Every WooCommerce product | type-product.js |
A specific WooCommerce product with slug "product1" | type-product-slug-product1.js |
WooCommerce shop page | archive-type-product.js |
WooCommerce product category page | tax-product_cat.js |
WooCommerce checkout page with slug "checkout" | type-page-slug-checkout.js |
WooCommerce account page with slug "my-account" | type-page-slug-my-account.js |