There are no comments yet.

Leave a Reply

Your email address will not be published. Required fields are marked (*).

function exclude_from_search($query) { if ($query->is_search) { $query->set('post_type', 'post'); } return $query; } add_filter('pre_get_posts','exclude_from_search');