Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #10747

    We are using the Flashlight theme.

    How do we set the products to appear in the order we want? Currently they are listed in alphabetical order. Our products are in sets of four so we want all 4 of one set per row. Currently they are all over the place.

    #69231

    Look for loop-shop.php in woocommerce plugin folder located in templates folder then drop this line after <ul class="products">.

    <?php
    $args = array(
    'post_type' => 'product',
    'ignore_sticky_posts' => 1,
    'orderby' => 'rand',
    );
    query_posts($args);
    ?>

    You can change the orderby array to asc, desc, rand etc.

    #69232

    Thanks! would ‘date’ work as a ‘orderby’?

    #69233

    After adding this:

    <?php

    $args = array(

    ‘post_type’ => ‘product’,

    ‘ignore_sticky_posts’ => 1,

    ‘orderby’ => ‘rand’,

    );

    query_posts($args);

    ?>

    The category pages no longer worked. When a category page is clicked now, all products show up regardless if they are in the category or not.

    #69234

    Hey sperkins2008,

    If you change it back, do they work again? I just want to make sure its related as it shouldn’t be causing that issue.

    Regards,

    Devin

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘How to set product orders in Flashlight?’ is closed to new replies.