From: Laury GvR Date: Thu, 18 Dec 2014 17:07:46 +0000 (-0500) Subject: More selective in forcing searches to post types X-Git-Tag: v1.0.0~8 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=879922ac2b768aa589a97a7cd4fa69c559f52547;p=WP-Themes%2FPrestonFeather.git More selective in forcing searches to post types --- diff --git a/functions.php b/functions.php index 007b855..93d45a7 100755 --- a/functions.php +++ b/functions.php @@ -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;