Return to Snippet

Revision: 37421
at December 9, 2010 22:36 by richerimage


Initial Code
function SearchFilter($query) {
    if ($query->is_search) {
        $query->set('cat','0,1');
    }
    return $query;
}

add_filter('pre_get_posts','SearchFilter');

Initial URL

                                

Initial Description

                                

Initial Title
Exclude Posts or Pages from Wordpress Search Results

Initial Tags

                                

Initial Language
PHP