Sort Posts (in the Loop) by Recent Comments or "Activity"
-
I’ve been searching Google and WordPress Forums up and down for a nice, easy solution to this, without any success.
Basically, I would like the Loop to query the database for posts with all the regular criteria a person would like, but with the option to sort the retrieved posts by activity, meaning by the most recent comments that post has received, regardless of the publish date of the post.
There are many attempts to solve this problem, many proprietary plugins, but no real solution. I’m actually surprised WordPress hasn’t implemented this themselves, as it can possibly add a “Forum-like” feel to certain sections of the blog.
Would something like this be possible by defining a new “order” type, like “ACTIVITY” or “RECENTCOMMENTS”?
Ex:query_posts('posts_per_page=50&order=ACTIVITY');
Here are some relevant links pertaining to this idea.
- The topic ‘Sort Posts (in the Loop) by Recent Comments or "Activity"’ is closed to new replies.