Title: [Plugin: GD Star Rating] WP_Query Sorting Problem
Last modified: August 20, 2016

---

# [Plugin: GD Star Rating] WP_Query Sorting Problem

 *  [Jorge A. Gonzalez](https://wordpress.org/support/users/nasium/)
 * (@nasium)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-gd-star-rating-wp_query-sorting-problem/)
 * Why is this snippit not sorting pages properly? It returns records, but not sorted
   by gdsr_sort.
 *     ```
       $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
                  $the_query = new WP_Query(
                      array(
                               'gdsr_sort' => 'rating',
                               'gdsr_order' => 'asc',
                               'post_type' => 'page',
                               'posts_per_page' => 10,
                               'paged' => $paged,
                               'post_parent' => $parent
                           )
                  );
       ```
   
 * [http://wordpress.org/extend/plugins/gd-star-rating/](http://wordpress.org/extend/plugins/gd-star-rating/)

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

 *  [alex.powell](https://wordpress.org/support/users/alexpowell/)
 * (@alexpowell)
 * [14 years ago](https://wordpress.org/support/topic/plugin-gd-star-rating-wp_query-sorting-problem/#post-2606229)
 * I’ve got the same issue.
 * Anyone got a solution?
 *  [bbakersmith](https://wordpress.org/support/users/bbakersmith/)
 * (@bbakersmith)
 * [14 years ago](https://wordpress.org/support/topic/plugin-gd-star-rating-wp_query-sorting-problem/#post-2606235)
 * I have the same issue as well.
 * This seems to have been a problem since at least 2010 and the plugin author just
   doesn’t really care.
 * More info:
    [http://wordpress.stackexchange.com/questions/12892/why-is-that-gdsr-sort-thumbs-gd-start-rating-plugin-only-works-with-query-post](http://wordpress.stackexchange.com/questions/12892/why-is-that-gdsr-sort-thumbs-gd-start-rating-plugin-only-works-with-query-post)
 * [http://www.gdstarrating.com/2010/09/26/gd-star-rating-1-9-5/comment-page-1/#comment-9662](http://www.gdstarrating.com/2010/09/26/gd-star-rating-1-9-5/comment-page-1/#comment-9662)
 *  [bbakersmith](https://wordpress.org/support/users/bbakersmith/)
 * (@bbakersmith)
 * [14 years ago](https://wordpress.org/support/topic/plugin-gd-star-rating-wp_query-sorting-problem/#post-2606236)
 * The workaround mentioned by Cilvic on the above stackexchange.com page works 
   for me.
 * In short, just set the GET parameters before using WP_Query.
 *     ```
       $_GET["gdsr_sort"] = 'rating';
       $_GET["gdsr_order"] = 'desc';
       ```
   

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

The topic ‘[Plugin: GD Star Rating] WP_Query Sorting Problem’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/gd-star-rating_333071.svg)
 * [GD Star Rating](https://wordpress.org/plugins/gd-star-rating/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gd-star-rating/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gd-star-rating/)
 * [Active Topics](https://wordpress.org/support/plugin/gd-star-rating/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gd-star-rating/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gd-star-rating/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [bbakersmith](https://wordpress.org/support/users/bbakersmith/)
 * Last activity: [14 years ago](https://wordpress.org/support/topic/plugin-gd-star-rating-wp_query-sorting-problem/#post-2606236)
 * Status: not resolved