• gingerbeardco

    (@gingerbeardco)


    Hi,

    I’m running the Mystile theme and Woo Commerce on my site and when people leave a review for a product it shows the oldest review first. I’m wanting to change it so that the latest review is at the top of the list and then they go in descending order.

    I’ve looked everywhere back can’t seem to find a way to make it happen. Can anyone help me please?

    my site is https://www.gingerbeard.co.uk

    Many thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Bob Cristello

    (@gntmidnight)

    I am pretty sure you can add code to your functions.php inside of your theme.

    function reverse_review_order( $x ){ $x['reverse_top_level'] = true; return $x; }
    add_filter( 'woocommerce_product_review_list_args', 'reverse_review_order', 999 );

    I believe that works. If it doesn’t, you could alternatively try this:

    function wpa_filter_list_comments($args){
      $args['reverse_top_level'] = true;
      return $args;
    }
    add_filter( 'woocommerce_product_review_list_args', 'wpa_filter_list_comments' );

    Please keep in mind that Reviews are nothing more than Comments and that is how WordPress handles them.

    Thread Starter gingerbeardco

    (@gingerbeardco)

    Thanks Bob. I’ll give that a try.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Descending Comments – Mystile Theme’ is closed to new replies.