Trying to fix the frontpage products by editing the args of the categories get_terms
authorLaury GvR <laury@gaslightmedia.com>
Wed, 22 Feb 2017 15:11:45 +0000 (10:11 -0500)
committerLaury GvR <laury@gaslightmedia.com>
Wed, 22 Feb 2017 15:11:45 +0000 (10:11 -0500)
sections/front-page.php

index 8e6b4b0..3d524fa 100644 (file)
@@ -35,7 +35,8 @@
     <div class="block-row">
         <div id="front-shop" class="block-column row small-up-1 medium-up-2 large-up-4" data-equalizer>
         <?php $args = array(
-            'post_status' => 'published',
+             'hide_empty' => false,
+             'exclude'    => '18',
              'orderby'    => 'menu_order',
              'order'      => 'ASC',
         );
                             <?php 
                             echo '<h4><a href="' . get_term_link( $product_category ) . '">' . $product_category->name . '</a></h4>';
                             $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 "<ul>";