Both of the following pages use the Archive template
- http://portabellointeriors.com/product-category/sofas/
- http://portabellointeriors.com/bed-size/super-king/
Yet they display content differently as on the first example, the classes "woocommerce woocommerce-page" are added to the < body> tag
How do I tell Wordpress to add the two classes "woocommerce" and "woocommerce-page" to all archive pages?
Your theme header should have something like
<body <?php body_class(); ?>>
.You can add to your
functions.php
, or, preferably, in a custom plugin the following filter to manipulate the classes being output:You can check WordPress function
get_body_class()
to see how it can be built.