Changing the query for the front end category display
authorLaury GvR <laury@gaslightmedia.com>
Fri, 2 Jun 2017 21:07:22 +0000 (17:07 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Fri, 2 Jun 2017 21:07:22 +0000 (17:07 -0400)
parts/cats-and-products.php
sections/front-page.php

index 9e7cc28..7cc4ae0 100644 (file)
@@ -7,7 +7,7 @@
          'hide_empty' => $hide_empty,
          'include'    => $ids,
          'exclude'    => '18'
-       
+
     );
     $product_categories = get_terms( 'product_cat', $args );
     $count = count($product_categories);
@@ -20,7 +20,6 @@
                     array(
                         'taxonomy' => 'product_cat',
                         'field' => 'slug',
-                        // 'terms' => 'white-wines'
                         'terms' => $product_category->slug
                     )
                 ),
@@ -32,7 +31,7 @@
                 <div class="side-product-wrapper">
                     <div class="side-product-container" data-equalizer-watch>
                         <div class="side-product-content-container">
-                            <?php 
+                            <?php
                             echo '<h5><a href="' . get_term_link( $product_category ) . '">' . $product_category->name . '</a></h5>';
                             echo "<ul>";
 
index a7b1ace..b3d99b6 100644 (file)
@@ -36,7 +36,7 @@
         <div id="front-shop" class="block-column row small-up-1 medium-up-2 large-up-4" data-equalizer>
         <?php $args = array(
              'hide_empty' => false,
-             'exclude'    => '18',
+             'exclude'    => '17',
              'orderby'    => 'menu_order',
              'order'      => 'ASC',
         );
                                  */
                                 do_action( 'woocommerce_before_subcategory_title', $product_category );
                         ?>
-                        </div> 
+                        </div>
                         <div class="front-product-content-container">
-                            <?php 
+                            <?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',
                                 'post_status' => 'publish',
                                 'orderby' => 'menu_order',
                                 'order' => 'ASC',
-                                'meta_query' => array(
-                                    array(
-                                        'key'       => '_visibility',
-                                        'value'     => 'hidden',
-                                        'compare'   => '!=',
-                                    )
-                                )
                             );
                             $products = new WP_Query( $args );
                             echo "<ul>";
         <?php } ?>
         </div>
     </div>
-        
+
     <div id="content-wrapper">
         <div class="block-row" data-equalizer data-equalize-on="medium" data-equalize-by-row="false">
             <?php