• I have the following query but would like to add “orderby random” to it. However it doesn’t work when you do this. Any ideas or help would be much appreciated.

    <?php
    $args = array(
    ‘post_type’ => ‘product’,
    ‘product_cat’ => ‘extras’,
    ‘product_tag’ => ‘featured-shop’,
    ‘posts_per_page’ => -1,
    );
    $loop = new WP_Query( $args );
    while ( $loop->have_posts() ) : $loop->the_post(); ?>

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘custom query order random’ is closed to new replies.