//michsci_list_categories($cat_id);
} else if ( !$catid_id && !$product_id ) {
michsci_list_products();
- //michsci_list_categories();
+ michsci_list_categories();
}
$output = ob_get_contents();
$taxonomy = MICHSCI_CATEGORY_NAME;
$args = array(
- 'hide_empty' => true,
+ 'hide_empty' => false,
'pad_counts' => true
);
if ( $cat_id ) {
if ( $iterator == $totalTerms) {
$term->end = true;
}
- $term->href = $current_url
- . ( ( strpos( $current_url, '?' ) ) ? '&' : '?' )
- . "category=" . $term->term_id;
+ $term->href .= //$current_url
+// ( ( strpos( $current_url, '?' ) ) ? '&' : '?' )
+ "?michsci_category=" . $term->term_id;
++$iterator;
}
-
-<div class="row">
+<div id="categoriesView" class="row">
<?php
if ( isset( $taxonomy_terms) && is_array( $taxonomy_terms ) ) :
foreach ( $taxonomy_terms as $term ) : ?>
+ <?php if (function_exists('z_taxonomy_image')) z_taxonomy_image(); ?>
<pre><?php //echo print_r( $term, true ) ?></pre>
- <div class="small-12 medium-3 columns<?php if ($term->end){ echo ' end';}?>">
- <div class="row">
- <div class="small-12 columns"><a href="<?php echo $term->href; ?>">
+ <div class="row">
+ <div class="small-12 columns<?php if ($term->end){ echo ' end';}?>">
+
+ <div id="catContainer" class= "small-12 medium-6 columns"><a href="<?php echo $term->href; ?>">
+ <img width="343" height="127" src="<?php echo z_taxonomy_image_url($term->term_id, 'thumbnail'); ?>" class="image wp-post-image no-display" alt="<?php echo $term->name; ?>" title="<?php echo $term->name; ?>" itemprop="image">
<?php echo $term->description ?></a>
</div>
- <div class="small-12 text-center columns">
+ <div class="small-12 medium-6 text-center columns">
<a href="<?php echo $term->href; ?>"> <?php echo $term->name; ?> </a>
</div>
</div>
<?php if(!isset($_COOKIE['view']) || $_COOKIE['view'] == "grid"){ ?>
- <div class="row">
+ <div id="productsView" class="row">
<?php if ( isset( $products ) && is_array( $products ) ) : foreach ( $products as $product ) : ?>
<div class="product grid small-12 medium-4 columns<?php if ($product->end){ echo ' end';}?>">