From ea0ca03605a63f71646c6f26e64ddd644469e968 Mon Sep 17 00:00:00 2001 From: Laury GvR Date: Mon, 21 Nov 2016 14:11:25 -0500 Subject: [PATCH] Don't show WooCommerce shop categories if there are none --- parts/shop-cats-and-products.php | 6 ++++-- parts/shop-sidebar.php | 4 +--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/parts/shop-cats-and-products.php b/parts/shop-cats-and-products.php index 4906022..6414057 100644 --- a/parts/shop-cats-and-products.php +++ b/parts/shop-cats-and-products.php @@ -2,8 +2,9 @@ $args = ''; $product_categories = get_terms( 'product_cat', $args ); $count = count($product_categories); - if ( $count > 0 ){ - foreach ( $product_categories as $product_category ) { + if ( $count > 0 ){?> +
+ -1, 'tax_query' => array( @@ -42,4 +43,5 @@
+ \ No newline at end of file diff --git a/parts/shop-sidebar.php b/parts/shop-sidebar.php index 099429f..3ee7ce5 100644 --- a/parts/shop-sidebar.php +++ b/parts/shop-sidebar.php @@ -7,9 +7,7 @@ Categories -
- -
+
Cart -- 2.17.1