qry jet
// WP_Query arguments
$args = array(
'post_type' => array( 'imovel' ),
'post_status' => array( 'published' ),
'nopaging' => false,
'posts_per_page' => '10',
'order' => 'DESC',
'orderby' => 'id',
'tax_query' => array(
array(
'taxonomy' => 'tipo_imovel',
'terms' => '$_REQUEST['tipo_imovel']',
'field' => 'slug',
),
array(
'taxonomy' => 'localizacao',
'terms' => '$_REQUEST['localizacao']',
'field' => 'slug',
'include_children' => true,
),
array(
'taxonomy' => 'comodidade_imovel',
'terms' => '$_REQUEST['comodidade_imovel']',
'field' => 'slug',
'operator' => 'AND',
),
array(
'taxonomy' => 'comodidade_condominio',
'terms' => '$_REQUEST['comodidade_condominio']',
'field' => 'slug',
'operator' => 'AND',
),
),
'meta_query' => array(
'relation' => 'AND',
array(
'key' => 'dormitorios',
'value' => '$_REQUEST['dormitorios']',
'compare' => '=',
'type' => 'NUMERIC',
),
array(
'key' => 'suites',
'value' => '$_REQUEST['suites']',
'compare' => '=',
'type' => 'NUMERIC',
),
array(
'key' => 'banheiros',
'value' => '$_REQUEST['banheiros']',
'compare' => '=',
'type' => 'NUMERIC',
),
array(
'key' => 'vagas',
'value' => '$_REQUEST['vagas']',
'compare' => '=',
'type' => 'NUMERIC',
),
array(
'key' => 'valor',
'value' => '$_REQUEST['valor']',
'compare' => 'BETWEEN',
'type' => 'NUMERIC',
),
),
);
// The Query
$query = new WP_Query( $args );