From: Laury GvR Date: Wed, 22 Feb 2017 15:11:45 +0000 (-0500) Subject: Trying to fix the frontpage products by editing the args of the categories get_terms X-Git-Tag: v1.0.16^2~5 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=bda926ba92bbeac06ce55c33746f624696dcc7e7;p=WP-Themes%2Fcapstone.git Trying to fix the frontpage products by editing the args of the categories get_terms --- diff --git a/sections/front-page.php b/sections/front-page.php index 8e6b4b0..3d524fa 100644 --- a/sections/front-page.php +++ b/sections/front-page.php @@ -35,7 +35,8 @@
'published', + 'hide_empty' => false, + 'exclude' => '18', 'orderby' => 'menu_order', 'order' => 'ASC', ); @@ -59,18 +60,18 @@ ' . $product_category->name . ''; $args = array( - 'posts_per_page' => -1, - 'tax_query' => array( - 'relation' => 'AND', - array( - 'taxonomy' => 'product_cat', - 'field' => 'slug', - 'terms' => $product_category->slug - ) - ), - 'post_type' => 'product', - 'orderby' => 'menu_order', - 'order' => 'ASC', + 'posts_per_page' => -1, + 'tax_query' => array( + 'relation' => 'AND', + array( + 'taxonomy' => 'product_cat', + 'field' => 'slug', + 'terms' => $product_category->slug + ) + ), + 'post_type' => 'product', + 'orderby' => 'menu_order', + 'order' => 'ASC', ); $products = new WP_Query( $args ); echo "
    ";