<?php echo '<a href="'. '?michsci_category=' . $cat_id . '" >' . print_r($ancestors, true) . "<br>"; ?>
</div>
<?php } ?>
-
-
-
<div id="categoriesGridView" class="row">
-<?php //get_template_part('parts/sidebar-l'); ?>
+<?php get_template_part('parts/sidebar-l'); ?>
<?php
if ( isset( $taxonomy_terms) && is_array( $taxonomy_terms ) ) :
foreach ( $taxonomy_terms as $term ) : ?>
<?php } ?>
<?php if(!isset($_COOKIE['catView']) || $_COOKIE['catView'] == "list"){ ?>
<div id="categoriesListView" class="row">
-
+ <?php get_template_part('parts/sidebar-l'); ?>
<?php
if ( isset( $taxonomy_terms) && is_array( $taxonomy_terms ) ) :
foreach ( $taxonomy_terms as $term ) : ?>
-<?php if(!isset($_COOKIE['view']) || $_COOKIE['view'] == "grid"){ ?>
<?php $cat_id = $_REQUEST[MICHSCI_CATEGORY_NAME]; ?>
<?php $term = get_term($cat_id, MICHSCI_CATEGORY_NAME); ?>
+<?php if(!isset($_COOKIE['view']) || $_COOKIE['view'] == "grid"){ ?>
<?php echo '<h1 id="catTitleOutput">' . $term->name . '</h1>'; ?>
-<?php get_template_part('parts/sidebar-l'); ?>
+<?php //get_template_part('parts/sidebar-l'); ?>
<div id="gridView" class="row">
<?php
echo category_description($cat_id);
<?php if($_COOKIE['view'] == "list"){ ?>
+<?php echo '<h1 id="catTitleOutput">' . $term->name . '</h1>'; ?>
<div id="listView" class="row">
- <?php
- $catNum = $_REQUEST[MICHSCI_CATEGORY_NAME];
- echo category_description($catNum);
- ?>
+ <?php
+ echo category_description($cat_id);
+ $cat_children = get_term_children($cat_id, MICHSCI_CATEGORY_NAME);
+ ?>
+ <?php $term = get_term($cat_id, MICHSCI_CATEGORY_NAME); ?>
+ <?php if($_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="subcat <?php echo $term->slug;?> list small-12 columns<?php if ($product->end){ echo ' end';}?>">
+ <div class="prodImgList small-12 medium-3 columns"><a href="<?php echo $cat->href . $term->term_id; ?>">
+ <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>
+
+ <div class="prodTitleList small-12 medium-3 columns">
+ <a href="<?php echo $cat->href . $term->term_id; ?>"><strong><?php echo $term->name; ?></strong></a>
+ </div>
+ </div>
+ <?php } ?>
+ <?php } else { ?>
<?php if ( isset( $products ) && is_array( $products ) ) : foreach ( $products as $product ) : ?>
<!-- <div class="row view">-->
<!-- </div>-->
<?php endforeach; endif; ?>
</div>
+ <?php } ?>
<?php } ?>