How do you order products in WooCommerce so that products are random, but at the same time featured products show first?
Here is my code:
$args = array( 'post_type' => 'product', 'showposts' => $show_posts, 'meta_key' => '_featured', 'orderby' => 'meta_value', 'order' => 'desc', 'post_status' => 'publish', 'paged' => $paged ); $all_products = new WP_Query( $args );
I have tried adding
meta_value, but it just randomizes products (in other words the featured ones don't display first).
Thanks in advance