Created
June 3, 2015 18:23
-
-
Save greymechanic/64897fde84d5f5b9783b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function SearchFilter($query) { | |
if ($query->is_search) { | |
// specific post to search | |
$query->set('post_type', 'feeds'); | |
} | |
return $query; | |
} | |
// loop | |
add_filter('pre_get_posts','SearchFilter'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment