'AND' ); //Location Types_Query if (!empty($_location)) { $tax_query[] = array( 'taxonomy' => 'location', 'field' => 'id', 'terms' => $_location ); } // Types Tax_Query if (!empty($_types)) { $tax_query[] = array( 'taxonomy' => 'types', 'field' => 'id', 'terms' => $_types, ); } // Contract Types meta_Query if (!empty($_contract)) { $meta_query[] = array( 'key' => '_realest_contract', 'value' => $_contract, 'compare' => 'IN', ); } $p_args = array( 'post_type' => 'property', // your CPT //'s' => $_name, // looks into everything with the keyword from your 'name field' //'relation' => 'AND', 'tax_query' => $tax_query, 'meta_query' => $meta_query, ); $propSearchQuery = new WP_Query( $p_args ); ?> have_posts() ) : ?>