Comment Queries
$args = array(
// args here
);
// The Query
$comments_query = new WP_Comment_Query();
$comments = $comments_query->query( $args );
// Comment Loop
if ( $comments ) {
foreach ( $comments as $comment ) {
echo '<p>' . $comment->comment_content . '</p>';
}
} else {
echo 'No comments found.';
}Last updated