Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

uye kullanıcı kodu sorgu

// WP_User_Query arguments
$args = array(
	'role'           => 'Editor',
	'number'         => '1',
	'count_total'    => true,
	'fields'         => 'all',
);

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

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