From: Laury GvR Date: Fri, 19 Dec 2014 17:34:00 +0000 (-0500) Subject: Check isset for searchType in functions.php X-Git-Tag: v1.0.0~7 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=068c08aab6db82294fbef6985b792786fdb647e0;p=WP-Themes%2FPrestonFeather.git Check isset for searchType in functions.php --- 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; }