$no_of_slider,
'post_status' => 'publish',
'post_type' => 'product',
'no_found_rows' => 1,
'meta_query' => array(),
'tax_query' => array(
'relation' => 'AND',
)
);
if (0 != $ample_shop_slider_section_cat_id) {
$query_args['tax_query'][] = array(
'taxonomy' => 'product_cat',
'field' => 'term_id',
'terms' => $ample_shop_slider_section_cat_id,
);
}
} else {
$query_args = array(
'posts_per_page' => $no_of_slider,
'no_found_rows' => true,
'post_status' => 'publish',
'ignore_sticky_posts' => true,
'post__not_in' => $sticky
);
}
$slider_query = new WP_Query($query_args);
while ($slider_query->have_posts()): $slider_query->the_post();
?>
5,
'post_status' => 'publish',
'post_type' => 'product',
'no_found_rows' => 1,
'meta_query' => array(),
'tax_query' => array(
'relation' => 'AND',
)
);
if (0 != $ample_shop_product_cat_id) {
$query_args['tax_query'][] = array(
'taxonomy' => 'product_cat',
'field' => 'term_id',
'terms' => $ample_shop_product_cat_id,
);
}
} else {
$query_args = array(
'posts_per_page' => 2,
'no_found_rows' => true,
'post_status' => 'publish',
'ignore_sticky_posts' => true,
'post__not_in' => $sticky
);
}
$slider_query = new WP_Query($query_args);
while ($slider_query->have_posts()): $slider_query->the_post();
?>