added conditional for subcats display
authorAnthony Talarico <talarico@gaslightmedia.com>
Wed, 13 Jan 2016 14:56:38 +0000 (09:56 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Wed, 13 Jan 2016 14:56:38 +0000 (09:56 -0500)
views/list_products.php

index a7c61d0..3e53cda 100644 (file)
@@ -5,12 +5,12 @@
        echo category_description($cat_id);
        $cat_children = get_term_children($cat_id, MICHSCI_CATEGORY_NAME);
     ?>
-      <?php  if(isset($_COOKIE['subcat'])){ ?>
+      <?php  if(isset($_COOKIE['subcat']) && $_COOKIE['subcat'] == 'subcat'){ ?>
        
        <?php foreach($cat_children as $cats){
             $term = get_term($cats, MICHSCI_CATEGORY_NAME); ?>
             <?php $tags = wp_get_post_terms($product->ID,'michsci_tag'); ?>
-            <div class="<?php echo $term->slug;?> grid small-12 medium-4 columns<?php if ($product->end){ echo ' end';}?>">
+            <div class="subcat <?php echo $term->slug;?> grid small-12 medium-4 columns<?php if ($product->end){ echo ' end';}?>">
                 <div class="prodImgGrid small-12 columns"><a href="<?php echo $product->href; ?>">
                      <img id="catImg" src="<?php echo z_taxonomy_image_url($cats, array(320, 285)); ?>" class="image wp-post-image no-display" alt=" "  title="<?php echo $term->name; ?>" itemprop="image">
                 </div>