From bda926ba92bbeac06ce55c33746f624696dcc7e7 Mon Sep 17 00:00:00 2001 From: Laury GvR Date: Wed, 22 Feb 2017 10:11:45 -0500 Subject: [PATCH] Trying to fix the frontpage products by editing the args of the categories get_terms --- sections/front-page.php | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) 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 "
    "; -- 2.17.1