How to show most commented posts in WordPress

In this tutorial we are showing How to list most commented posts in WordPress using your custom query below code is there you just copy and make it your.

PHP code for show most commented posts in WordPress

<?php
$popular = new WP_Query( array(
    'post_type' => array( 'post' ),
    'showposts' => 6,
    'ignore_sticky_posts' => true,
    'orderby' => 'comment_count',
    'order' => 'dsc'
));
while ( $popular->have_posts() ): $popular->the_post();
the_title();
endwhile;
?>

Leave a Reply

Related Posts: You may like

How to track contact form 7 form in salesforce without plugin

Contact Form 7 Redirect to Thank You Page

How to Validation Business Email in Contact Form 7 WordPress

How to Create and get WordPress Custom Field

PHPKIDA Offering Free Tools:

INSTA DOWNLOADER

Download Instagram Videos & Photos.

Download Now

CURRENCY CONVERTER

Real Time Currency Converter

Convert Now

ROBOST.TXT GEN.

Robots.txt File Creater

Create Now

HTML MINIFIER

Compress yout HTML Code

Minify Now

CSS MINIFIER

Compress yout CSS Code

Minify Now

JAVASCRIPT MINIFIER

Compress yout JavaScript Code

Minify Now

Sign up for weekly update

Milkshake is almost ready. If you're interested in testing it out, then sign up below to get exclusive access.