
Now that finally GD Star Rating from 1.5.0 supports reordering posts on any page using ratings and reviews data, from both standard and multis ratings, it’s time to explain for less experienced users how to do it. And as it turns out, it’s very simple.
Plugin can sort posts using different data. Up to date list of supported columns for sorting is in the info files included with plugin. Also, I plan to add filters to the query, so you can expect regular updates and more features you can use in listing and filtering posts using ratings, reviews or votes.
Currently there are 3 new variables added. They are used to choose sorting column (gdsr_sort), sorting order (gdsr_order) and multi set that will be used, or should the standard rating is to be used (gdsr_multi). Sorting can be done using ratings, number of votes or review ratings. To use it, you can add it directly to the URL (front page, archive, or any other page that is used to get posts).
Here are the URL examples:
- http://www.gdstarrating.com/?gdsr_sort=rating&gdsr_order=desc
- http://www.gdstarrating.com/?gdsr_sort=review&gdsr_order=desc
- http://www.gdstarrating.com/category/tutorials/?gdsr_sort=votes&gdsr_order=asc
First, sorts data descending using ratings. Second sorts by reviews, and third on by number of votes but ascending. Third one is used in a category. If you want to use multi ratings data, you need to add third parameter specifying multi rating set:
- http://www.gdstarrating.com/?gdsr_sort=rating&gdsr_order=desc&gdsr_multi=4
- http://www.gdstarrating.com/?gdsr_sort=review&gdsr_order=asc&gdsr_multi=3
But, you can use the same variables to modify queries used by query_posts function. Here are few examples:
query_posts("gdsr_sort=rating");
query_posts("gdsr_sort=review&sort_order=asc");
query_posts("gdsr_sort=rating&gdsr_multi=3");
query_posts("gdsr_sort=votes&sort_order=asc&gdsr_multi=3");
More on how to use query_posts function you can find on official WordPress Codex. As for expanding WP queries, you can expect more in some of the next versions.
loading...





July 3, 2009
at 5:12 AM
Direct link
perfect-exactly what I needed. Works perfectly! Thank you!
loading...
July 3, 2009
at 4:50 PM
Direct link
Thank you! This is something I’ve been waiting for.
loading...
July 4, 2009
at 5:47 PM
Direct link
Thank you for the plugin…
But I need some help please…
I’ve instaled this great plugin, but when I want to show my results in a page I have this columms:
title votes rating review
I want to eliminate the column review…
How do I do that?
Thank you
loading...
July 4, 2009
at 5:56 PM
Direct link
You need to change template used for rendering, and use new template. You have templates map in one of the tutorial and features post. I will also few more default templates for this in one of the next versions.
loading...
July 4, 2009
at 7:48 PM
Direct link
solved
thank you very much mate… you saved the day
loading...
July 5, 2009
at 5:12 PM
Direct link
and for reorder comments?
loading...
July 5, 2009
at 5:24 PM
Direct link
This is a bit of a problem, since WP doesn’t have the same control for comments as it has for posts. I will definitely add ways to control it, but I am not sure when.
loading...
July 5, 2009
at 5:27 PM
Direct link
ok thanks, it’ll be really interesting.
waiting for see it as soon as posible
regards.
loading...
July 5, 2009
at 10:07 PM
Direct link
I use it but it doesn’t work with me on WP 2.8 , after activate it I have white page .
loading...
July 5, 2009
at 11:18 PM
Direct link
You need to give me something more. But most likely you have run out of memory. WP 2.8 uses much more memory than 2.7.
loading...
July 5, 2009
at 11:51 PM
Direct link
I use 1.2.3 version and it’s work fine with WP 2.8
loading...
July 6, 2009
at 12:21 AM
Direct link
Versions after 1.3 are much different, and they require some 20% more memory.
loading...
July 7, 2009
at 8:49 PM
Direct link
Not only do I find your programme hard to use (not got it working yet at all) but your help and documentation is even worse. Stop assuming that everyone is a PC wizz kid and make things simple!
loading...
July 7, 2009
at 9:11 PM
Direct link
And what is complicated with reordering posts, for instance? I didn’t made WordPress, and adding query parameters can’t be done any other way.
loading...
July 18, 2009
at 2:29 PM
Direct link
Hi! I’m using your awesome plugin for a Review-Site now.
So I set up a multi for a Page and got 3 Questions:
The first one: Can you reorder Posts by Multis?
The second one: Can you show just the results of the vote on the Frontpage?
The third one: I just forgot it. :p
loading...
July 18, 2009
at 4:07 PM
Direct link
1. Yes. Read the post again, it’s explained.
2. Yes. There are shortcode and function for this.
loading...
July 18, 2009
at 2:51 PM
Direct link
congratulations for the plugin, my only problem is that my theme is not the function of the widget plugin, I wonder if I should add some code .. thanks
loading...
July 18, 2009
at 4:06 PM
Direct link
Again, yes. There are more than 20 functions available for all kinds of integrations. Check info files for details, Builder panel and tutorials.
loading...
July 21, 2009
at 10:18 PM
Direct link
Another valuable function is to sort by thumbs. Here’s how that goes:
http://www.gdstarrating.com/?gdsr_sort=rating&gdsr_order=desc
loading...
July 21, 2009
at 10:19 PM
Direct link
doh
Sort this way:
http://www.gdstarrating.com/?gdsr_sort=thumbs&gdsr_order=desc
loading...
July 22, 2009
at 6:33 PM
Direct link
I’m hoping for a param which lets me specify number of days. For example, I want to display the posts with the most votes in the past week in descending order.
loading...
July 22, 2009
at 7:52 PM
Direct link
More and more filters will be added.
loading...
July 28, 2009
at 9:05 AM
Direct link
Pls GD Rating Top 10 Sidebar Code ..
Tnx..
loading...
July 31, 2009
at 5:48 AM
Direct link
It is not working for me…
I am trying to sort the posts on the main page of my blog, by rating.
I want the highest rated post to be at the top.
How do I do that using the url method or any other method??
My website that I am making is lmaowow.com
thanks in advance.
loading...
July 31, 2009
at 12:20 PM
Direct link
Both sorting methods are described in the post. BUT, in some cases url method will not work, because of the multiple loops in the theme. In your case url method described in the post works fine.
loading...
July 31, 2009
at 9:09 AM
Direct link
Hey
How do I do I re-order posts using the thumbs up/down rating??
This only seems to work for the star ratings.
thx
loading...
July 31, 2009
at 12:21 PM
Direct link
Use the same methods from the post. But also check the info files for all support WP_Query modifications. Many more are added since the post is published.
loading...
July 31, 2009
at 6:41 PM
Direct link
Hmm, I want to use Thumbs up/down as well, and sort the posts using that.
It does not seem to be working.
I am using this url to sort it:
http://lmaowow.com/?gdsr_sort=rating&gdsr_order=desc
As you can see, the posts are not in order of the rankings…please help!
loading...
July 31, 2009
at 7:47 PM
Direct link
As I said, check the query parameters in the info files. If you did that, you would see that for sorting you should use thumbs not rating as a parameter value:
http://lmaowow.com/?gdsr_sort=thumbs&gdsr_order=desc
loading...