From: Laury GvR Date: Wed, 28 Jun 2017 14:40:10 +0000 (-0400) Subject: Adjusting the inside shop sidebar category display to show the new Category X-Git-Tag: v1.0.23^2~3 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=b74336036ff250563f8b69cbd044cec55f5073ae;p=WP-Themes%2Fcapstone.git Adjusting the inside shop sidebar category display to show the new Category --- diff --git a/parts/shop-cats-and-products.php b/parts/shop-cats-and-products.php index 385d7ea..b428f66 100644 --- a/parts/shop-cats-and-products.php +++ b/parts/shop-cats-and-products.php @@ -1,14 +1,13 @@ term_id; - $args = array( - 'orderby' => 'title', - 'order' => 'ASC', - 'hide_empty' => false, - 'exclude' => $excluded_cat_id - + $excluded_cat = get_term_by( 'slug', 'whitepapers', 'product_cat' ); + $excluded_cat_id = $excluded_cat->term_id; + $args = array( + 'hide_empty' => false, + 'exclude' => $excluded_cat_id, + 'orderby' => 'menu_order', + 'order' => 'ASC', ); $product_categories = get_terms( 'product_cat', $args ); $count = count($product_categories); @@ -18,6 +17,7 @@ 'posts_per_page' => -1, 'tax_query' => array( 'relation' => 'AND', + array( 'taxonomy' => 'product_cat', 'field' => 'slug', @@ -28,13 +28,6 @@ 'post_status' => 'publish', 'orderby' => 'menu_order', 'order' => 'ASC', - 'meta_query' => array( - array( - 'key' => '_visibility', - 'value' => 'hidden', - 'compare' => '!=', - ) - ) ); $products = new WP_Query( $args ); if ($products->have_posts()) { ?>