From: Steve Sutton Date: Thu, 16 Jul 2015 17:55:36 +0000 (-0400) Subject: Redo search X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=19e2ed50f60e33870512e8fbaaba6e2f59fd7d97;p=web%2FGruntInit%2FglmTheme.git Redo search put check for the searchType into the seaorch page and skip showing page post_types if searchType is blog --- diff --git a/root/functions.php b/root/functions.php index 7fae8c9..8edc962 100644 --- a/root/functions.php +++ b/root/functions.php @@ -102,17 +102,6 @@ if (!function_exists('glm_get_clientinfo_option')) { } } -function SearchFilter($query) { - if(isset($_GET['searchType'])) { - $searchType = $_GET['searchType']; - if ($searchType == 'blog' && !is_admin()) { - $query->set('post_type', 'post'); - } - } - return $query; -} -add_filter('pre_get_posts','SearchFilter'); - /** * glm_offcanvas_menu * @@ -215,19 +204,19 @@ add_action('init', 'mytheme_init', 10); function mytheme_search_loop() { while ( have_posts() ) : the_post(); ?> - +
- +
- + diff --git a/root/search.php b/root/search.php index e380968..12f2771 100644 --- a/root/search.php +++ b/root/search.php @@ -7,6 +7,7 @@
+ post_type=='page')) continue; ?>
- \ No newline at end of file +