'product',
'posts_per_page' => $product_number
);
$query = new WP_Query($product_args);
if($query->have_posts()) { while($query->have_posts()) { $query->the_post();
?>
'product',
'meta_key' => '_featured',
'meta_value' => 'yes',
'posts_per_page' => $product_number
);
$query = new WP_Query($feature_product);
if($query->have_posts()) { while($query->have_posts()) { $query->the_post();
?>
'product',
'posts_per_page' => $product_number,
'meta_query' => array(
'relation' => 'OR',
array( // Simple products type
'key' => '_sale_price',
'value' => 0,
'compare' => '>',
'type' => 'numeric'
),
array( // Variable products type
'key' => '_min_variation_sale_price',
'value' => 0,
'compare' => '>',
'type' => 'numeric'
)
)
);
$query = new WP_Query($on_sale);
if($query->have_posts()) { while($query->have_posts()) { $query->the_post();
?>
'product',
'meta_key' => 'total_sales',
'orderby' => 'meta_value_num',
'posts_per_page' => $product_number
);
$query = new WP_Query($upsell_product);
if($query->have_posts()) { while($query->have_posts()) { $query->the_post();
?>