CIW WP
// WP_Query arguments
$args = array(
'post_type' => array( 'posts' ),
'post_status' => array( 'publish' ),
'order' => 'ASC',
'orderby' => 'date',
'meta_query' => array(
'relation' => 'AND',
array(
'key' => 'ciw_post_metaitem_type',
'value' => '$get_ciw_post_metaitem_type',
),
array(
'key' => 'ciw_post_metaitem_payment',
'value' => '$get_ciw_post_metaitem_payment',
),
array(
'key' => 'ciw_post_metaitem_price',
'value' => '$get_ciw_post_metaitem_price',
'compare' => 'BETWEEN',
'type' => 'NUMERIC',
),
),
);
// The Query
$product = new WP_Query( $args );
// The Loop
if ( $product->have_posts() ) {
while ( $product->have_posts() ) {
$product->the_post();
// do something
}
} else {
// no posts found
}
// Restore original Post Data
wp_reset_postdata();