Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

sarzamin product

// WP_Query arguments
$args = array(
	'post_type'              => array( 'products' ),
	'post_status'            => array( 'publish' ),
	'order'                  => 'DESC',
	'orderby'                => 'date',
	'tax_query'              => array(
		'relation' => 'AND',
		array(
			'taxonomy'         => 'products_cat',
			'terms'            => '$sarzamin_products_cat',
			'field'            => 'term_id',
			'operator'         => 'IN',
		),
		array(
			'taxonomy'         => 'city_cat',
			'terms'            => '$sarzamin_city_cat',
			'field'            => 'term_id',
			'operator'         => 'IN',
		),
	),
	'meta_query'             => array(
		'relation' => 'AND',
		array(
			'key'     => 'options_filterimg',
			'value'   => '$sarzamin_options_filterimg',
			'compare' => 'IN',
			'type'    => 'NUMERIC',
		),
		array(
			'key'     => 'options_pool',
			'value'   => '$sarzamin_options_pool',
			'compare' => 'IN',
			'type'    => 'NUMERIC',
		),
		array(
			'key'     => 'products_price',
			'value'   => '$sarzamin_products_price',
			'compare' => 'BETWEEN',
			'type'    => 'NUMERIC',
		),
		array(
			'key'     => 'options_metrazh',
			'value'   => '$sarzamin_options_metrazh',
			'compare' => 'BETWEEN',
			'type'    => 'NUMERIC',
		),
	),
);

// The Query
$sarzamin_product = new WP_Query( $args );

// The Loop
if ( $sarzamin_product->have_posts() ) {
	while ( $sarzamin_product->have_posts() ) {
		$sarzamin_product->the_post();
		// do something
	}
} else {
	// no posts found
}

// Restore original Post Data
wp_reset_postdata();