I want to encourage my authors to provide feedback to new posts that have not received enough exposure. To do this, I want to add a box to WP-Admin that lists the top 3 latest posts (from the past two days) with least comments.
In terms of table structure, I'm thinking something like this answer for listing latest posts.
All you need is a table with
class='widefat'
andget_posts()
. Then you run through the results (if there are any) and print the table rows.
The code works great but his was for listing the latest 10 posts, my question is how to list the latest posts with least comments?
$wpdb
with probably some JOIN in your query. See documentation