Answer the question
In order to leave comments, you need to log in
How to write different css for different woocommerce categories?
There are two main categories, each containing subcategories and products.
I'm looking for a way to make one of these categories with a different design.
It is necessary that the products in the category are displayed as a list, and not as a classic showcase.
I could change the outer one via css, but the categories don't have an individual class or id.
Point in the right direction.
Tell me, is it possible to somehow set id / class for a specific category? Or maybe there is a ready-made solution for a long time, but I don’t know.
It is necessary to assign this category class from the admin area
Thank you
Answer the question
In order to leave comments, you need to log in
Issue resolved.
You need to resort to term meta from the native functionality of Wordpress.
This tutorial put everything in its place.
Different classes are body
added depending on the page where the visitor is located. For example :.term-165
- this is the class of exactly one of the product categories, for another category there will be a different class
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question