How to Display Most Commented Posts in WordPress (3 Methods, 2026)
Most WordPress sites treat comments as an afterthought. But the posts with the most comments are your best engagement signals, and surfacing them helps readers find your most-discussed content fast.
I’ve managed comments on 800+ client sites through Gatilab, and the pattern is consistent: showing most-commented posts increases time on site by 15-25% because readers gravitate toward active discussions.
Here are three tested methods to display your most commented posts in WordPress, from plugin-based to code-based, each with different tradeoffs on flexibility and performance.
Why display most commented posts on your WordPress site?

Your most commented posts represent the content your audience cares about most. Displaying them prominently serves multiple purposes:
- Social proof: High comment counts signal trustworthy, discussion-worthy content to new visitors.
- Time on site: Readers spend more time scrolling through comments, which reduces bounce rate.
- Content ideas: Comments reveal what your audience wants to learn next.
- Community building: Showing active discussions encourages new readers to join the conversation.
- Internal linking benefit: Automatically surfaces your strongest performing content.
One caveat: if your site gets a lot of spam comments, filter them with Akismet Anti-Spam first. Displaying spam-inflated comment counts hurts credibility instead of building it.
Quick comparison: plugin vs analytics vs code
Before picking a method, here’s how the three approaches stack up:
| Method | Difficulty | Dependencies | Best for |
|---|---|---|---|
| WordPress Popular Posts plugin | Easy | Plugin (free) | Most users, widget + shortcode support |
| MonsterInsights Popular Posts | Easy | MonsterInsights Pro ($99.60/yr) | Users already running MonsterInsights |
| Custom WP_Query code | Medium | None (core WordPress) | Developers, zero-plugin approach |
Display most commented posts on WordPress [3 Ways]

Here are the three best ways to show your most-commented posts, tested on WordPress 6.7+ in 2026.
1. WordPress Popular Posts plugin

WordPress Popular Posts by Hector Cabrera is the most reliable free plugin for this. It has 200,000+ active installs and works with WordPress 6.7+. Setup takes about 5 minutes.
Install the plugin from your WordPress dashboard under Plugins > Add New. Search for “WordPress Popular Posts” and activate it.


After activation, the plugin dashboard shows your most viewed, trending, and most commented posts automatically.


Add most commented posts to your sidebar
Go to Appearance > Widgets (or use the block-based widget editor in WordPress 6.7+). Add the “WordPress Popular Posts” widget to your sidebar, then set the Sort by option to “Comments.”



The widget also supports filters for shorten titles, thumbnail display, post excerpt, category, post type, and tags.
Add most commented posts inside blog posts (shortcode)
WordPress Popular Posts provides a shortcode you can drop into any post or page. Use the Shortcode block in the Gutenberg editor and paste:
[wpp range="last30days" stats_comments=1 order_by="comments"]

Find all available shortcode parameters in the plugin’s official documentation.
2. MonsterInsights Popular Posts widget
If you already use MonsterInsights for Google Analytics integration (version 8.x+, WordPress 6.7 compatible), you can use its built-in Popular Posts widget to show most-commented posts.
Go to Insights > Popular Posts in your WordPress dashboard. Click “Popular Posts Widget” at the top.

Choose a theme for the widget display. The design automatically adapts to your WordPress theme’s styling.

Important: Set the sort order to “Comments” to display posts by comment count instead of views.

For placement, you can choose automatic (appends to every blog post) or manual (Gutenberg block).

To add the widget manually, search for “Popular Posts” in the Gutenberg block inserter and add it wherever you want in your content.


3. Custom code with WP_Query (no plugin needed)
If you prefer zero plugins, you can use WordPress core’s WP_Query with orderby=comment_count. This method requires adding code to your child theme’s functions.php or using the Code Snippets plugin (safer than editing theme files directly).
Here is a working snippet that creates a [most_commented] shortcode:
function gt_most_commented_posts() {
$args = array(
'posts_per_page' => 5,
'orderby' => 'comment_count',
'order' => 'DESC',
'post_status' => 'publish',
'ignore_sticky_posts' => true,
);
$query = new WP_Query( $args );
if ( ! $query->have_posts() ) {
return '<p>No commented posts found.</p>';
}
$output = '<ul class="most-commented-posts">';
while ( $query->have_posts() ) {
$query->the_post();
$output .= '<li><a href="' . get_permalink() . '">' . get_the_title() . '</a> (' . get_comments_number() . ' comments)</li>';
}
$output .= '</ul>';
wp_reset_postdata();
return $output;
}
add_shortcode( 'most_commented', 'gt_most_commented_posts' );To add thumbnails, insert get_the_post_thumbnail( get_the_ID(), array(40, 40) ) before the anchor tag inside the loop.
Performance note: This query runs on every page load. For high-traffic sites, cache the output using WordPress transients with a 1-hour expiry.
You can also use the core Query Loop block in WordPress 6.7+ to display posts sorted by comment count directly in the block editor, no code needed. Set the “Order by” to “Comment count” in the block’s query settings.
Which method should you use?
For most WordPress users, the WordPress Popular Posts plugin is the best choice. It’s free, lightweight, well-maintained by Hector Cabrera, and works with both the widget area and shortcodes.
If you already pay for MonsterInsights Pro, use its built-in widget to avoid adding another plugin.
The custom code approach makes sense only if you’re a developer who wants zero plugin dependencies and full control over the HTML output.
Have a question about setting this up? Drop a comment below or reach me on X @wpgaurav.
Related reading:
- How to upload WebP images to WordPress properly
- How to add FAQ schema in WordPress
- How to write better blog comments
- Best WordPress plugins for your blog