added "all products" string to non-category page
authorAnthony Talarico <talarico@gaslightmedia.com>
Tue, 2 Feb 2016 17:53:34 +0000 (12:53 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Tue, 2 Feb 2016 17:53:34 +0000 (12:53 -0500)
index.php

index 1015982..0a0e320 100644 (file)
--- a/index.php
+++ b/index.php
@@ -444,6 +444,10 @@ function michsci_shortcode($atts)
     }
     $term = get_term_by("id", $_REQUEST[MICHSCI_CATEGORY_NAME],"michsci_category");
     $name = $term->name;
+    
+    if(!$name){
+        $name = "ALL PRODUCTS";
+    }
     echo $name;
     global $wp;
     echo '<form id="catSubmit" action=""><div class="row catSearch"><div id="viewBtns" class="12-small medium-3 columns"> <button id="grid" type="button">Grid</button> <button id="list"type="button">list</button>