<?php if (function_exists('z_taxonomy_image')) z_taxonomy_image(); ?>
<div class="small-12 medium-4 columns<?php if ($term->end){ echo ' end';}?>">
<div class="row">
- <div id="catContainer" class= "small-12 columns"><a href="<?php echo $term->href; ?>">
+ <div class="catContainer" class= "small-12 columns"><a href="<?php echo $term->href; ?>">
<img id="catImg" src="<?php echo z_taxonomy_image_url($term->term_id, array(320, 285)); ?>" class="image wp-post-image no-display" alt="<?php echo $term->name; ?>" title="<?php echo $term->name; ?>" itemprop="image">
<div id="catTitleGrid" class="small-12 columns">
<?php if(!isset($_COOKIE['view']) || $_COOKIE['view'] == "grid"){ ?>
<div id="gridView" class="row">
<?php
- // sub cats
- $catNum = $_REQUEST[MICHSCI_CATEGORY_NAME];
- echo category_description($catNum);
- $cat_id = $_REQUEST[MICHSCI_CATEGORY_NAME];
- $cat_children = get_term_children($cat_id, MICHSCI_CATEGORY_NAME);
-
- 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;?> product grid small-12 medium-4 columns<?php if ($product->end){ echo ' end';}?>">
+ $cat_id = $_REQUEST[MICHSCI_CATEGORY_NAME];
+ echo category_description($cat_id);
+ $cat_children = get_term_children($cat_id, MICHSCI_CATEGORY_NAME);
+?>
+
+ <?php if(isset($_COOKIE['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="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>
<a href="<?php echo $cat->href . $term->term_id; ?>"><strong><?php echo $term->name; ?></strong></a>
</div>
</div>
-
- <?php // end sub cats
- }
+ <?php } ?>
+ <?php
+ } else {
?>
<?php if ( isset( $products ) && is_array( $products ) ) : foreach ( $products as $product ) : ?>
<?php $tags = wp_get_post_terms($product->ID,'michsci_tag'); ?>
</div>
<?php } ?>
+
<?php if($_COOKIE['view'] == "list"){ ?>
<div id="listView" class="row">
<?php
<?php endforeach; endif; ?>
</div>
<?php } ?>
+<?php } ?>