$args = '';
$product_categories = get_terms( 'product_cat', $args );
$count = count($product_categories);
- if ( $count > 0 ){
- foreach ( $product_categories as $product_category ) {
+ if ( $count > 0 ){?>
+ <div class="categories">
+ <?php foreach ( $product_categories as $product_category ) {
$args = array(
'posts_per_page' => -1,
'tax_query' => array(
</div>
<?php } ?>
<?php } ?>
+ </div>
<?php } ?>
\ No newline at end of file
Categories
</a>
</div>
- <div class="categories">
- <?php echo get_template_part("parts/shop-cats-and-products"); ?>
- </div>
+ <?php echo get_template_part("parts/shop-cats-and-products"); ?>
<div class="page_item page_item_has_children">
<a href="<?php echo $woocommerce->cart->get_cart_url(); ?>">
Cart