views:

30

answers:

1

Guys im in need of a way to sort my posts by views, rating, comments. ive search loads of plugings but their all buggy.

i want something like this. sorting

+1  A: 

You're going to have to write your own custom queries in Wordpress. This involves getting comfortable with PHP and some Wordpress API.

A good starting point: http://codex.wordpress.org/Displaying_Posts_Using_a_Custom_Select_Query

As for the ways you want to sort, you'll first need to capture views and ratings. My intuition says you can store everything in custom fields--so familiarize yourself with the post_meta table. Here are some thoughts off the top of my head:

Most Viewed: In your single.php, everytime a post is loaded, make sure you add a custom field that increments - use this custom field in your ORDER BY query.

st4ck0v3rfl0w