We create beautiful & user-friendly websites and provide quality web development services worldwide.
Contact us to get started on your project.
Tutorial
How to Display Most Commented Posts in WordPress without a Plugin
For those of you that run a WordPress site, you may wish to display a list of posts with the most number of comments. This is typically achieved by using a plugin/widget. But did you know that you can easily do this without a plugin too?
You can use the query_posts() function to display your most commented posts without a plugin, thanks to the new comment_count orderby parameter available since WordPress version 2.9.
Display Most Commented Posts in WordPress Without a Plugin
<ol> <?php $wp_query = new WP_Query('caller_get_posts=1&orderby=comment_count&posts_per_page=10'); while ($wp_query->have_posts()) : $wp_query->the_post(); { ?> <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a> (<?php comments_number('0 comment', '1 comment', '% comments'); ?>)</li> <?php } endwhile; ?> </ol>
Note: To change the number of posts to display, modify the posts_per_page parameter.
And How about adding thumbnails to them?
Thanks but I’m looking something as most commented today , this week and this month do you have any idea?