Check isset for searchType in functions.php
authorLaury GvR <laury@gaslightmedia.com>
Fri, 19 Dec 2014 17:34:00 +0000 (12:34 -0500)
committerLaury GvR <laury@gaslightmedia.com>
Fri, 19 Dec 2014 17:34:00 +0000 (12:34 -0500)
functions.php

index 93d45a7..530e5e5 100755 (executable)
@@ -34,9 +34,11 @@ function glm_page_menu($parent = 0, $class = '')
 
 
 function SearchFilter($query) {
-    $searchType = $_GET["searchType"];
-    if ($searchType == 'blog') {
-        $query->set('post_type', 'post');
+    if(isset($_GET['search-type'])) {
+        $searchType = $_GET['searchType'];
+        if ($searchType == 'blog' && !is_admin()) {
+            $query->set('post_type', 'post');
+        }
     }
     return $query;
 }