From: Laury GvR Date: Mon, 21 Nov 2016 19:11:25 +0000 (-0500) Subject: Don't show WooCommerce shop categories if there are none X-Git-Tag: v1.0.0^2~62 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=ea0ca03605a63f71646c6f26e64ddd644469e968;p=WP-Themes%2Foriginalbutterflyhouse.git Don't show WooCommerce shop categories if there are none --- 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