Skip to content

Instantly share code, notes, and snippets.

@Pross Pross/gist:9254063
Created Feb 27, 2014

Embed
What would you like to do?
<?php
function SearchFilter($query) {
if ($query->is_search) {
$query->set( 'post__not_in' , array( 165 ) ); // Page ID
}
return $query;
}
add_filter('pre_get_posts','SearchFilter');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.