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?

Why show most commented posts in WordPress

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:

MethodDifficultyDependenciesBest for
WordPress Popular Posts pluginEasyPlugin (free)Most users, widget + shortcode support
MonsterInsights Popular PostsEasyMonsterInsights Pro ($99.60/yr)Users already running MonsterInsights
Custom WP_Query codeMediumNone (core WordPress)Developers, zero-plugin approach

Display most commented posts on WordPress [3 Ways]

Three methods to display most commented posts in WordPress

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

WordPress Popular Posts plugin icon

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.

WordPress dashboard plugins screen
Search WordPress Popular Posts plugin

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

WordPress Popular Posts dashboard overview
Most commented posts stats in plugin dashboard

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.”

WordPress appearance widgets menu
Popular Posts widget in sidebar
Sort widget by comments setting

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"]
Adding shortcode block in Gutenberg editor
Shortcode pasted in Gutenberg shortcode block

Find all available shortcode parameters in the plugin’s official documentation.

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.

MonsterInsights popular posts widget settings

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

MonsterInsights widget wide and narrow display options

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

Sort by most commented setting in MonsterInsights

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

Automatic placement option for MonsterInsights widget

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

MonsterInsights popular posts block in Gutenberg inserter
MonsterInsights popular posts block in post editor

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: