Title: orderby rating
Last modified: September 1, 2016

---

# orderby rating

 *  [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/orderby-rating/)
 * Is there any way of using the orderby parameter to order my custom query results
   by the star rating of a post? i.e.
 *     ```
       'orderby' => 'yasr',
       'order'   => 'DESC',
       ```
   
 * [https://wordpress.org/plugins/yet-another-stars-rating/](https://wordpress.org/plugins/yet-another-stars-rating/)

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

 *  Plugin Contributor [dudo](https://wordpress.org/support/users/dudo/)
 * (@dudo)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/orderby-rating/#post-7669779)
 * HEllo, yes, this is possible, yasr uses post_meta now, as soon as back home I’ll
   be glad to help you with this.
 * Best,
    Dario
 *  Thread Starter [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/orderby-rating/#post-7669781)
 * Thanks Dario. I think I’ve also asked this same question on the Google Support
   Forum so apologies for the duplication.
 *  Thread Starter [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/orderby-rating/#post-7669800)
 * Hi Dario. Any news on this? Thanks.
 *  Plugin Contributor [dudo](https://wordpress.org/support/users/dudo/)
 * (@dudo)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/orderby-rating/#post-7669805)
 * you can query the table _postmeta where meta_key = ‘yasr_overall_rating’ order
   desc
 *  Thread Starter [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/orderby-rating/#post-7669812)
 * Thanks for this but I can’t get it to work. I am using the yasr_pro_average_comments_ratings
   rating for my site. Is there any chance you could give me an example of the code
   to use to show the post titles on the page?
 *  Plugin Contributor [dudo](https://wordpress.org/support/users/dudo/)
 * (@dudo)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/orderby-rating/#post-7669813)
 * Ah, you’re talking about a shortcode from an extension: due to wordpress rules,
   I can’t answer it here: please write on the private google support forum
 *  Thread Starter [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/orderby-rating/#post-7669814)
 * Added a comment to the Google Forum.

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

The topic ‘orderby rating’ is closed to new replies.

 * ![](https://ps.w.org/yet-another-stars-rating/assets/icon-256x256.png?rev=1525329)
 * [YASR - Yet Another Star Rating Plugin for WordPress](https://wordpress.org/plugins/yet-another-stars-rating/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yet-another-stars-rating/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yet-another-stars-rating/)
 * [Active Topics](https://wordpress.org/support/plugin/yet-another-stars-rating/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yet-another-stars-rating/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yet-another-stars-rating/reviews/)

## Tags

 * [order](https://wordpress.org/support/topic-tag/order/)
 * [orderby](https://wordpress.org/support/topic-tag/orderby/)

 * 7 replies
 * 2 participants
 * Last reply from: [greencode](https://wordpress.org/support/users/greencode/)
 * Last activity: [9 years, 8 months ago](https://wordpress.org/support/topic/orderby-rating/#post-7669814)
 * Status: not resolved