I want a list of users who have a url (and exclude those who don’t)
-
Hello,
I would like to generate a list of users who have a URL filled in in their profile. But! I want to exclude those who don’t.
I already found this:<br /> <?php $blogusers = get_users_of_blog(); //gets registered users<br /> if ($blogusers) {<br /> foreach ($blogusers as $bloguser) {<br /> $user = get_userdata($bloguser->user_id); //gets the actual data about each user<br /> echo $user->display_name." <a>user_url."\">".$user->user_url."</a><p>".$user->description."</p>";<br /> if ($user->user_level == 10) {echo "<b>Admin</b>"; }<br /> }<br /> }<br /> else { echo "Bizarrely, your blog appears to have no users. Something weird has happened."; }</p> <p>?><br />
And it’s working, but I don’t know how to exclude members without website, right now it’s displaying all members…
Thank you very much, you wise people!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘I want a list of users who have a url (and exclude those who don’t)’ is closed to new replies.