07-27-2023, 10:24 AM
I looking for all day, a proper solution for make woocommerce template with bootstrap grid. Always i tried make changes with hooks because i think its the best way.
**Woocommerce display products list like this:**
<ul class="products">
<li class="post-24 product type-product status-publish has-post-thumbnail product_cat-zupki-z-chin product_tag-test first instock shipping-taxable purchasable product-type-simple"></li>
<li class="post-30 product type-product status-publish has-post-thumbnail product_cat-zupki-z-chin instock shipping-taxable purchasable product-type-simple"></li>
<li class="post-31 product type-product status-publish has-post-thumbnail product_cat-zupki-z-chin instock shipping-taxable purchasable product-type-simple"></li>
<li class="post-32 product type-product status-publish has-post-thumbnail product_cat-zupki-z-chin last instock shipping-taxable purchasable product-type-simple"></li>
</ul>
**I would like change this to proper bootstrap grid.
Something like that:**
<div class="row">
<div class="col-md3">product</li>
<div class="col-md3">product</li>
<div class="col-md3">product</li>
<div class="col-md3">product</li>
</ul>
Change ul to div its possible by function woocommerce_product_loop_start(), but how can I change/replace **li class="....** to **div class="col-md....** ?
Thank you in advance for your help
**Woocommerce display products list like this:**
<ul class="products">
<li class="post-24 product type-product status-publish has-post-thumbnail product_cat-zupki-z-chin product_tag-test first instock shipping-taxable purchasable product-type-simple"></li>
<li class="post-30 product type-product status-publish has-post-thumbnail product_cat-zupki-z-chin instock shipping-taxable purchasable product-type-simple"></li>
<li class="post-31 product type-product status-publish has-post-thumbnail product_cat-zupki-z-chin instock shipping-taxable purchasable product-type-simple"></li>
<li class="post-32 product type-product status-publish has-post-thumbnail product_cat-zupki-z-chin last instock shipping-taxable purchasable product-type-simple"></li>
</ul>
**I would like change this to proper bootstrap grid.
Something like that:**
<div class="row">
<div class="col-md3">product</li>
<div class="col-md3">product</li>
<div class="col-md3">product</li>
<div class="col-md3">product</li>
</ul>
Change ul to div its possible by function woocommerce_product_loop_start(), but how can I change/replace **li class="....** to **div class="col-md....** ?
Thank you in advance for your help