Add a body class for product category archive page in Woocommerce
问题 I want to add product category slug in the body class on product category archive pages. Here is an example of what I would like (url of the product category page example) : https://example.com/product-category/canon/ … So I would like "canon" in the body class. 回答1: Your example link doesn't seem to work; however, WooCommerce should already be adding a term-specific class to your category pages: something along the lines of archive tax-product_cat term-{slug} term-{id} to a product category