Title: Review ordering
Last modified: June 20, 2020

---

# Review ordering

 *  Resolved [saens](https://wordpress.org/support/users/saens/)
 * (@saens)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/review-ordering/)
 * Hi,
    I must be going crazy, cause something seems off.
 * Say I have a product with 12 reviews. What I want is latest review at the top,
   and always show (the latest) 10 reviews per page (with older ones moving to 2nd
   page).
    With the latest review shown on top.
 * With WP settings this doesn’t seem possible.
    If I set it to 10 per page and 
   last page shown I see only the latest 2 reviews and 10 on the first page. What
   I’d want is see the last 10, with the other 2 moving to other page.
 * I added an image: [https://imgur.com/a/bpjomRf](https://imgur.com/a/bpjomRf)
    -  This topic was modified 5 years, 11 months ago by [saens](https://wordpress.org/support/users/saens/).
    -  This topic was modified 5 years, 11 months ago by [saens](https://wordpress.org/support/users/saens/).
    -  This topic was modified 5 years, 11 months ago by [saens](https://wordpress.org/support/users/saens/).

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

 *  [Rynald0s](https://wordpress.org/support/users/rynald0s/)
 * (@rynald0s)
 * Automattic Happiness Engineer
 * [5 years, 11 months ago](https://wordpress.org/support/topic/review-ordering/#post-13028359)
 * Hi [@saens](https://wordpress.org/support/users/saens/)!
 * It sounds like you would like to have the most recent reviews listed first. If
   that is the case, you can use some code, as outlined here:
 * [https://jeffgrundy.com/woocommerce-display-newest-product-reviews-first/](https://jeffgrundy.com/woocommerce-display-newest-product-reviews-first/)
 * This is how you can add custom code to your site the correct way:
 * [http://rynaldo.com/how-to-add-custom-code-to-your-woocommerce-wordpress-site-the-right-way/](http://rynaldo.com/how-to-add-custom-code-to-your-woocommerce-wordpress-site-the-right-way/)
 * Cheers!
 *  Thread Starter [saens](https://wordpress.org/support/users/saens/)
 * (@saens)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/review-ordering/#post-13028446)
 * Hi, thanks. It does not do what I want. I want to always see the latest 10 reviews
   on the page. The splitting of the 10s (out of total) does not start with the 
   latest 10, but with the oldest 10 working forwards in time.
 * The way it’s working now:
 * with 11 reviews, the latest review is on a page and the other 10 on the other
   page
    with 20 reviews, it’s 10 on the first and 10 on the 2nd (OK) with 21 reviews,
   it’s latest review on the first and 10 on the 2nd page and 1 on the third.
 * It’s also explained here: [http://bassjobsen.weblogs.fm/wordpress-reverse-comment-order-paged-comments/](http://bassjobsen.weblogs.fm/wordpress-reverse-comment-order-paged-comments/)
 * Neither code solutions in functions.php work for me, though.
 * The comments are sorted in reverse order, but when adding the X per page option
   the undesired splitting over pages happens.
    -  This reply was modified 5 years, 11 months ago by [saens](https://wordpress.org/support/users/saens/).
    -  This reply was modified 5 years, 11 months ago by [saens](https://wordpress.org/support/users/saens/).
 *  [con](https://wordpress.org/support/users/conschneider/)
 * (@conschneider)
 * Engineer
 * [5 years, 11 months ago](https://wordpress.org/support/topic/review-ordering/#post-13038344)
 * Hi there,
 * > The comments are sorted in reverse order, but when adding the X per page option
   > the undesired splitting over pages happens.
 * What happens when you try combinations of these settings:
 * [https://d.pr/i/u037kl](https://d.pr/i/u037kl)
    and the custom code here: [https://jeffgrundy.com/woocommerce-display-newest-product-reviews-first/](https://jeffgrundy.com/woocommerce-display-newest-product-reviews-first/)
 * Kind regards,
 *  [con](https://wordpress.org/support/users/conschneider/)
 * (@conschneider)
 * Engineer
 * [5 years, 11 months ago](https://wordpress.org/support/topic/review-ordering/#post-13068560)
 * Hi there,
 * We haven’t heard back from you in a while, so I’m going to mark this as resolved–
   if you have any further questions, you can start a new thread.
 * Kind regards,
 *  [livesyzygy](https://wordpress.org/support/users/livesyzygy/)
 * (@livesyzygy)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/review-ordering/#post-13415308)
 * Hi There – I am having the same issue! I’ve tried adding the code snippet to 
   functions.php but like [@saens](https://wordpress.org/support/users/saens/) the
   pagination breaks up the re-ordering so page 1 still has the oldest posts (just
   re-ordered newest to oldest) and page 3 has the newest.
 * Is there any other work arounds we can try?
 *  Thread Starter [saens](https://wordpress.org/support/users/saens/)
 * (@saens)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/review-ordering/#post-13418201)
 * Afaik there is not. Even though this is marked as resolved, the issue is not 
   resolved.
    Marking stuff as “resolved” when the topic starter hits a brick wall
   is fun 😉
 * I worked around it by creating my own code which pulls the comments from the 
   database and shows them.
 *  [livesyzygy](https://wordpress.org/support/users/livesyzygy/)
 * (@livesyzygy)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/review-ordering/#post-13425489)
 * Any chance you want to share that code with me? 🙂
 * [@conschneider](https://wordpress.org/support/users/conschneider/)
 *  Thread Starter [saens](https://wordpress.org/support/users/saens/)
 * (@saens)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/review-ordering/#post-13429209)
 * The gist is:
    Fil array with the comments
 *     ```
       		$comments = get_comments( array( 
       			'post_id' => $product->get_id(),
       			'number' => $count_reviews,
       			'type' => 'review'
       			) );
       ```
   
 * then run through the loop and output the comment how you wish.
    I put it together
   based off examples at stackexchange.com
 * My code won’t help you since it’s tailored to my specific demands. The basic 
   is the same as the examples that you can find.

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

The topic ‘Review ordering’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 8 replies
 * 4 participants
 * Last reply from: [saens](https://wordpress.org/support/users/saens/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/review-ordering/#post-13429209)
 * Status: resolved