Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

comment_totale

total comment

// WP_Comment_Query arguments
$args = array(
	'status'         => 'approve',
	'type'           => 'comment',
	'post_status'    => 'publish',
	'post_type'      => 'job_listing',
	'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
}