Comments Query
This is the custom comments query
// WP_Comment_Query arguments $args = array( 'status' => 'approve', 'type' => '', 'post_status' => 'published', 'number' => '10', 'orderby' => 'comment_date', 'count' => true, ); // The Comment Query $comment_query = new WP_Comment_Query( $args ); // The Comment Loop if ( $comment_query ) { foreach ( $comment_query as $comment ) { // do something } } else { // no comments found }