1
2
3
4
5
6
7
8
9 //exclude posts from search
function SearchFilter($query) {
if ($query->is_search) {
$query->set('cat','0,1');
}
return $query;
}
add_filter('pre_get_posts','SearchFilter');
wp_nav_menu()
December 8, 2012/ Updated: December 8, 2012