testing for catid before display cat ancestors
authorAnthony Talarico <talarico@gaslightmedia.com>
Fri, 29 Jan 2016 17:49:06 +0000 (12:49 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Fri, 29 Jan 2016 17:49:06 +0000 (12:49 -0500)
views/list_categories.php

index 84c7a5d..68b4934 100644 (file)
@@ -1,7 +1,8 @@
 <?php if(!isset($_COOKIE['catView']) || $_COOKIE['catView'] == "grid"){ ?>
  <?php $cat_id = $_REQUEST['michsci_category']; 
- $ancestors = get_category_parents($cat_id, false, " > "); ?>
-
+ if($cat_id){
+      $ancestors = get_category_parents($cat_id, false, " > "); ?>
+ }
 <div class="small-12 medium-6" id="productBreadcrumbs">
  <?php echo '<a href="'. get_permalink(510) .  '">' . Products . '</a>'." > "; ?>
 <?php foreach($ancestors as $relative){