Posted By

alexeihidalgo on 04/04/11


Tagged

wordpress


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

rasitozcan
baires


Display Recently Registered Users on WordPress


 / Published in: PHP
 

  1. <ul class="recently-user">
  2. <?php $usernames = $wpdb->get_results("SELECT user_nicename, user_url FROM $wpdb->users ORDER BY ID DESC LIMIT 5");
  3. foreach ($usernames as $username) {
  4. echo '<li>' .get_avatar($username->comment_author_email, 45).'<a href="'.$username->user_url.'">'.$username->user_nicename."</a></li>";
  5. }
  6. ?>
  7. </ul>

Report this snippet  

You need to login to post a comment.