More selective in forcing searches to post types
authorLaury GvR <laury@gaslightmedia.com>
Thu, 18 Dec 2014 17:07:46 +0000 (12:07 -0500)
committerLaury GvR <laury@gaslightmedia.com>
Thu, 18 Dec 2014 17:07:59 +0000 (12:07 -0500)
functions.php

index 007b855..93d45a7 100755 (executable)
@@ -34,7 +34,8 @@ function glm_page_menu($parent = 0, $class = '')
 
 
 function SearchFilter($query) {
-    if ($query->is_search) {
+    $searchType = $_GET["searchType"];
+    if ($searchType == 'blog') {
         $query->set('post_type', 'post');
     }
     return $query;