How to Display Most Commented Posts in WordPress (2 Ways)

How to Display Most Commented Posts in WordPress (2 Ways)

Do you want to display your most commented posts in WordPress?

Highlighting your most commented posts helps your visitors find your best content, increase pageviews, and boost website engagement.

In this article, we’ll show you how to display the most commented posts in WordPress, step by step.

Your most commented posts have very high levels of user engagement. By displaying your popular posts, you encourage new readers to join the discussion and spend more time on your WordPress website, while boosting your social proof.

When your visitors stay on your site longer, this gives you a chance to convince them to read another post, join your email list, or make a purchase.

Plus, when new visitors leave a comment, they become part of the community. This can help you build trust with your readers over the long term.

That being said, let’s take a look at how to simply display your most commented posts in WordPress using 2 methods.

There are many different WordPress popular posts plugins that you can use to display your popular articles, but the simplest to use is MonsterInsights.

It’s the best analytics solution for WordPress used by over 3 million websites. With this plugin, you can easily display your most commented posts anywhere on your website.

First thing you need to do is install, activate, and set up the plugin. For more details, see our beginner’s guide on how to install Google Analytics in WordPress.

Note: there is a free version of MonsterInsights, but we’re using the pro version for this tutorial since it includes the popular posts feature.

Upon activation, navigate to Insights » Popular Posts and then click the ‘Popular Posts Widget’ menu item.

On this screen, you will control the appearance of your most commented posts.

Simply select the ‘Theme’ you want to use for your most commented posts. The theme operates similar to your WordPress theme and will control the overall design of the most commented posts widget.

There are a ton of other customization options on this screen as well.

For example, in the ‘Theme Preview’ meta box, you can display your most commented posts in a ‘Wide’ format below your content, or ‘Narrow’ format to the right of your content.

After that, you have more options for customizing the design.

For example, you can change the size and color of the title, icon, and background.

MonsterInsights will automatically save any changes you make to your most commented posts display settings.

Once you’re finished customizing the appearance of your commented posts, it’s time to display your popular posts by comments.

In the ‘Sort By’ meta box, simply select the ‘Comments’ button.

MonsterInsights will automatically display your most commented posts.

You have a few different options for adding your popular posts to WordPress. You can choose manual or automatic placement.

If you choose ‘Automatic’ placement, then the plugin will add your most commented WordPress posts directly after the last paragraph of your blog posts.

The other option is to display your most commented posts manually. If you select the ‘Manual’ option, then you can add the popular posts widget with a Gutenberg block or a shortcode.

To do this, open up a page or post where you want to display your most commented posts.

Then, click the ‘+’ icon and select the ‘Popular Posts’ block.

This will automatically add your most commented posts to your page.

Make sure you click ‘Update’ or ‘Publish’ to make your changes live. Now when your users visit the page, they will see your most commented posts displayed.

Display Most Commented Posts in Your WordPress Sidebar

If you want to display your most commented posts in your WordPress sidebar, then go to Appearance » Widgets.

After that, find the ‘Popular Posts — MonsterInsights’ widget and drag it to your sidebar widget area.

Next, you can give your widget a title, choose the number of posts to display, select the theme, change colors, and more.

The customization options are similar to the widget customization settings above.

Once you’re done making changes click ’Save’, and your popular posts with the most comments will be live on your WordPress blog.

The second method involves adding code to your WordPress files. If you haven’t done this before, then check out our beginner’s guide to pasting snippets from the web into WordPress.

However, there are some downsides to using this method. First, it involves adding code to WordPress, so it’s not very beginner friendly.

Second, the code isn’t as optimized for performance as the MonterInsights plugin, so it will increase the server load, and it can slow down your website.

That being said, let’s take a look at how you can display most commented posts in WordPress without a plugin.

You’ll want to add the following code to your functions.php file, in a site-specific plugin, or by using a code snippets plugin.

The code above will run a database query and fetch 10 posts ordered by the highest comment count. Then, it uses output buffering to create a shortcode you can use to display the posts.

The last line of the code creates a shortcode that you can use in your posts, pages, and widget areas.

To display your popular posts, all you need to do is add the following shortcode to your WordPress site.

For more details, see our beginner’s guide on how to add a shortcode in WordPress.

If you want to add thumbnails next to your post titles, then add the following line of code right after

Images Powered by Shutterstock