Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Candidates

// WP_User_Query arguments
$args = array(
	'role'           => 'job_seeker',
	'number'         => '10',
	'order'          => 'ASC',
	'orderby'        => 'user_registered',
	'meta_query'     => array(
		'relation' => 'AND',
		array(
			'key'     => 'candidate_id',
			'compare' => 'NOT EXISTS',
		),
	),
	'fields'         => 'all_with_meta',
);

// The User Query
$candidates = new WP_User_Query( $args );

// The User Loop
if ( ! empty( $candidates->results ) ) {
	foreach ( $candidates->results as $user ) {
		// do something
	}
} else {
	// no users found
}