How to Display Most Commented Posts in Your WordPress Sidebar
We were asked this question over the email, how to display the most commented posts in WordPress sidebar. Therefore, in this article we are sharing a plugin called Most Commented which displays a list of most commented posts in your sidebar.
You must download and activate the plugin. Then you need to place the following code in your sidebar.php or any other theme file.
<?php mdv_most_commented(); ?>
To customize the list, you may also use parameters like:
<?php mdv_most_commented(10, '', '<br />', true, 30, true) ?>
Parameters
$no_posts – sets the number of posts to display
$before – text to be displayed before the link to the post
$after – text to be displayed after the link to the post
$show_pass_post – whether or not to display password protected posts
$duration – displays comments for recent number of days
$echo – whether or not to echo the output or return an array of values
Above is the most popular plugin. An alternative plugin is called Most Comments which also provides a widget in the admin panel for you to use it. It basically gives you the same output.
Most Commented
Comments
One Response to “How to Display Most Commented Posts in Your WordPress Sidebar”Share Your Opinions
Tell us what you're thinking...
and if you want a pic to show with your comment, then get gravatar!
Please make sure that you have read our Comment Policy.










Thank you!
This is really helpful and easy!