From 068c08aab6db82294fbef6985b792786fdb647e0 Mon Sep 17 00:00:00 2001 From: Laury GvR Date: Fri, 19 Dec 2014 12:34:00 -0500 Subject: [PATCH] Check isset for searchType in functions.php --- functions.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/functions.php b/functions.php index 93d45a7..530e5e5 100755 --- a/functions.php +++ b/functions.php @@ -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; } -- 2.17.1