Wordpress orderby function
I'm using Post Ratings on one of my Wordpress sites and I want to give my visitors the possibility to sort the posts by rating. For that I'm using a $_GET function and this code:
case 'rated' : $orderby = '&meta_key=rating&orderby=meta_value';
The code works fine but I also want to sort the posts by number of votes so that a post that has a rating of 5 and 3 votes should be placed before a post that has a rating of 5 but only 1 vote. How can I do that?
/Woolwich
The 2nd Amendment, 1789 - The Original Homeland Security.
Gun control means never having to say, "I missed you."