function custom_search_filter( $query ) {
if ( !is_admin() && $query->is_main_query() ) {
if ( $query->is_search ) {
$query->set( ‘post_type’, array( ‘post’, ‘page’, ‘team’ ) );
}
}
}
add_action( ‘pre_get_posts’,’custom_search_filter’ );
function custom_search_filter( $query ) {
if ( !is_admin() && $query->is_main_query() ) {
if ( $query->is_search ) {
$query->set( ‘post_type’, array( ‘post’, ‘page’, ‘team’ ) );
}
}
}
add_action( ‘pre_get_posts’,’custom_search_filter’ );