Created
February 24, 2015 23:36
-
-
Save asecondwill/002e9f871202ea5d2596 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 GetCertainPostTypes($query) { | |
if ($query->is_search) { | |
$query->set('post_type',array('person')); | |
} | |
return $query; | |
} | |
add_filter('pre_get_posts','GetCertainPostTypes'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment