For some reason this is not working for me 🙁
$get_members = array(
'blog_id' => $GLOBALS['blog_id'],
'role' => 'sm_flagar',
);
$blogusers = get_users($get_members);
foreach ($blogusers as $user) {
echo "<li><a href="".$user->user_url."">". $user->first_name ." ". $user->last_name ."</a></li>";
}
first_name
andlast_name
are stored in theusermeta
table. Therefore you have to useget_user_meta()
to return these data. Try this code snippet: