I have fixed all things in Woocommerce plugin as per my requirements, but i am unable to find one solution. Woocommerce default shop page products loop code is like this
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
I want it to change this code into this
<div class="row">
<div class="col-md-4">
// Product Loop Card here
</div>
<div class="col-md-4">
// Product Loop Card here
</div>
<div class="col-md-4">
// Product Loop Card here
</div>
<div class="col-md-4">
// Product Loop Card here
</div>
// etc etc etc
</div>
Which function/filter/hooks or custom template can do this? Please help me
3
Answers
You have to change the file named
you can get this here
Just change the follows templates by overridden it into your theme –
loop/loop-start.php
-> remove<ul>
tag and replace it with<div class="row products columns-<?php echo esc_attr( wc_get_loop_prop( 'columns' ) ); ?>">
loop/loop-end.php
-> remove</ul>
tag and replace it with</div>
content-product.php
->1. remove
<li <?php wc_product_class( '', $product ); ?>>
tag and replace it with<div class="col-md-4">
2. remove
</li>
tag and replace it with</div>
you need to access the woocommerce/loop folder
inside it has two loop-strat and loop-end files
delete ul, if using bootstrap enter the following code
in loop-end file you need to close divs
now in the content-product file you will create your loop I’m leaving one here of my files example.