testing sub cats
authorAnthony Talarico <talarico@gaslightmedia.com>
Tue, 12 Jan 2016 20:03:33 +0000 (15:03 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Tue, 12 Jan 2016 20:03:33 +0000 (15:03 -0500)
views/list_products.php

index 9426c25..606709c 100644 (file)
@@ -9,7 +9,12 @@
   
    ?>
     <?php $cat_id = $_REQUEST[MICHSCI_CATEGORY_NAME];
-    echo $cat_id;
+    $cat_children = get_term_children($cat_id, MICHSCI_CATEGORY_NAME);
+    foreach($cat_children as $cats){
+        $term = get_term($cat, MICHSCI_CATEGORY_NAME);
+        echo $term->name;
+    }
     ?>
    <?php if ( isset( $products ) && is_array( $products ) ) : foreach ( $products as $product ) : ?>
    <?php $tags = wp_get_post_terms($product->ID,'michsci_tag'); ?>