Answer the question
In order to leave comments, you need to log in
How to add css class to WooCommerce product?
There is such a standard code for displaying products (this is its beginning):
All classes are added dynamically.
I need to add the bootstrap class col-**-* to it. How can I do that? Or write for everything by hand in a css file? <li <?php post_class( $classes ); ?>>
Answer the question
In order to leave comments, you need to log in
В post_class() посылается переменная $classes. Добавляйте свой класс туда. Если $classes это массив, то так:
Если строка, то так:$classes .= 'col-sm-6';
Самый тупой вариант это добавить
<li class="col-**-*" <?php post_class( $classes ); ?>>
Может кому нужно будет, решил задачу так:
https://makbori.com/blog/woocommerce/dobavit-svoj-...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question