I need some help I have the iteration working for listing the wordpress users however I also want to wrap their names in links and can't seem to get the user url to work... Nothing is returned to me.
Here is what I have so far.... You will see that I am trying to pull in the user_url however it just returns as nothing. Any help would be great! Thanks
<?php
$blogusers = get_users(
array(
'role' => 'subscriber',
'fields' => 'all'
)
);
echo '<ul>';
foreach ( $blogusers as $user ) {
echo '<li><a href="' . $user->user_url . '">' . $user->display_name . '</a>';
}
echo '</ul>'
?>
Aucun commentaire:
Enregistrer un commentaire