How To Display Most Commented Posts In WordPress (3 New Ways)!

Want to display the most commented posts on your WordPress website, huh?

Don’t worry – it’s easier than you think.

You just have to follow this tutorial.

So, without wasting any more time:

Let’s dive in.

Why you should display most commented posts on WordPress?

  • Save

Before we go into the nitty-gritty details of adding the most commented posts – First, we have to see why we should add the most commented posts?

Most commented posts on your website are those posts that have the most amount of comments on them.

There are several benefits of showing them, which are:

  • Displaying these posts leads the other readers to join the discussion.
  • Most the comments on the post, more the readers would spend time reading it. Which leads to more time on site.
  • A lot of comments on the post gives reader the signal that this website gives legit information. As many people are engaging on it.
  • More time on site due to a lot of comments leads in filling of email subscription form, buying a product etc. It leads to the reduction of the bounce rate of your website.
  • You can get a lot of posts ideas from the comments. So, you won’t run out of content ever.
  • If you reply to each of the reader’s comment, it increases the chance that the reader would share your article.

Want to know how to increase genuine blog comments, then see this video by Neil Patel:

There are enormous benefits on why you should add the most commented post on your website.

But there is one disadvantage too.

If your website gets a lot of spam comments like, “Nice Article”, “Buy this”, “Buy that” then don’t ever show most commented posts.

So, instead of increasing the trust of the genuine reader, it does the exact opposite.

You can filter that kind of spam comments automatically with the help of the Akismet Anti Spam plugin.

With that being said, let’s jump on how you can add the most commented posts on your website.

Trending Now>> 15 Popular Indian Blogs To Learn Blogging!

Display most commented posts on WordPress [3 Ways]

  • Save

In this post, I am going to discuss the 3 Best ways to add the most commented posts on your WordPress website.

So, let’s start:

1. WordPress Popular Posts

  • Save

WordPress popular post is one of the best and lightweight plugins to display most commented posts on your WordPress website.

It helps to display it in a matter of clicks.

To install this plugin, you first have to go to your WordPress dashboard.

  • Save

Inside that, you have to go to the plugin section and type “WordPress Popular Posts” in the search bar.

  • Save

Then you have to install and activate this plugin on your website.

  • Save

Just after activation, you would be redirected to the dashboard of the plugin.

  • Save

There you would see the most viewed post, trending post, and most commented posts of your website.

How to add most commented posts in sidebar?

First, let’s start with adding the most commented posts in the sidebar.

To do this, you first have to click on appearance and then the widget.

  • Save

There you would see “Popular Posts Widget”.

  • Save

Just drag it to your sidebar.

Next, click on “Sort Posts” and choose “Comments” to display the most commented posts.

  • Save

Along with that, there are a lot of other cool filters in it as well:

  • Shorten titles
  • Thumbnail adding
  • Display post excerpt 
  • Category
  • Post type
  • Tags
  • And more..

How to add most commented posts in blog posts?

Next, let’s add the most commented posts in your blog posts.

This plugin gives you a shortcode that you can add to your blog post to show the most commented post anywhere on your website.

See this video if you don’t know how to add shortcodes to the WordPress website:

Here is the shortcode by which you can display the 10 most commented posts on your website.

[wpp range="last30days" stats_comments=1 order_by="comments"]

First, you have to copy this code. Go to your Gutenberg Editor.

Click on the “+” sign and type “Shortcode“.

  • Save

Click on the block and add the code to it.

  • Save

You would get a lot of other shortcodes with this plugin, which has different uses.

You can get all these shortcodes from here.

2. Monster Insights

Monster Insights is a plugin that is mainly used to integrate Google Analytics into your WordPress website.

Along with that, you can also add most commented posts on your website with it.

You have to go to the dashboard of your WordPress website and click on Insights >> Popular Posts.

Next, click on “Popular Posts Widget” on the top.

  • Save

After that, choose the theme in which you want to show the commented posts on your website.

Not to worry – The design of the widget will blend with your WordPress theme.

So, it won’t affect your site’s design.

You can customize the widget further.

For example, you can choose if the most commented posts widget would appear wide or narrow.

  • Save

This plugin automatically saves the changes you are doing to this widget.

Don’t forget to sort the posts by comments to see the most commented posts.

  • Save

After doing all this, you have to choose how you want to place the widget in your blog post.

You can choose automatic placement if you want to show the most commented post widget at the end of your every blog post.

  • Save

Along with that, you can choose manual placement if you want to add the widget manually to your blog posts.

Display most commented post widget in blog posts

To add the most commented post widget, you have to first go to the Gutenberg editor of the blog post you want to add the widget.

Click on the “+” button.

  • Save

Type “Popular Posts” and click on the widget to add it to your blog post.

  • Save

In this way, you can add the widget wherever you want in your blog post.

Display most commented post in sidebar

Next, to add the most commented post in the sidebar, you first have to go to appearance >> widget.

There you will find the “Popular Posts – Monster Insights” widget.

  • Save

Drag and drop the widget to your working sidebar.

Next, you can customize the widget similarly as I have mentioned above.

But don’t forget to sort the widget by comments to display the posts according to comments number.

Once after doing all this, click on save changes.

3. Without any plugin

The last method to display most commented posts on WordPress is by adding code to the files of your WordPress website.

However, there are a lot of downsides of this method.

First, it is not a beginner-friendly approach as most of the new bloggers have almost zero knowledge of coding.

Second, the code is not very well optimized.

As a result, the code will add a lot of load on your hosting, which would make your website slow.

function wpb_most_commented_posts() {
// start output buffering
ob_start();
?>
have_posts()) : $query->the_post(); ?>
<?php
// Turn off output buffering
$output = ob_get_clean();
//Return output
return $output;
}
// Create shortcode
add_shortcode('wpb_most_commented', 'wpb_most_commented_posts');
//Enable shortcode execution in text widgets
add_filter('widget_text', 'do_shortcode');

To display the most commented post without a plugin, you just have to add this code by wpbeginner to your functions.php file.

To add this code to your WordPress website you first have to go to appearance >> theme editor.

  • Save

In the theme editor, find functions.php and in that add this code at the end of it.

  • Save

After adding this code, it would generate a shortcode with which you can add the most commented posts list wherever you want.

Here is the shortcode which you have to add:

[wpb_most_commented]

To show the thumbnail of the most commented posts, you have to add this code right after the <li> tag in the code given above.

<?php the_post_thumbnail(array(40,40)); ?>

The image size would be of thumbnail, which you can change according to your needs by tweaking the code given above.

Still, I would suggest you to use any of the plugins given above to display the most commented posts.

Instead of adding code manually to your website.

As it has more customizations.

Dead End

Displaying the most commented posts on your WordPress website is easy, but can build a huge rapport among your readers.

So, use it wisely!

Now, I would like to hear from you:

Which method you are going to use to add the most commented post on your WordPress website?

Tell me your answer in the comments given below.

One request, if you liked this article then do share it on your social media.

Because it would help our blog to grow and provide highly research tutorials for you.

Recommended Reading: