Answer the question
In order to leave comments, you need to log in
How to remove unnecessary html tags in woocommerce?
Hello!
I'm trying to stretch my layout on woocommerce. There was such difficulty:
1. Fine imposition of an output of cards of the goods has a trace. view.
Displays 4 cards via divs
2. Woocommerce wraps product cards in lists + extra div
Question: How do I remove ul, li tags and remap div class="woocommerce columns-4 "
to
Thanks in advance! <div class="card">
Answer the question
In order to leave comments, you need to log in
It is not necessary to change tags, let it be a list, it does not affect anything.
To add your class to the wrapper, you can use a similar hook:
// Добавить класс к обертке с товарами
add_filter('woocommerce_product_loop_start', 'mytheme_product_loop_start');
function mytheme_product_loop_start() {
?>
<ul class="card-group products columns-<?php echo esc_attr( wc_get_loop_prop( 'columns' ) ); ?>">
<?php
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question