Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

function wassimo realted

By: a guest on Mar 24th, 2012  |  syntax: PHP  |  size: 0.96 KB  |  hits: 110  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2.  
  3. //get all users, iterate through users, query for one post for the user,
  4. //if there is a post then display the post title, author, content info
  5. $blogusersz =  get_users();
  6.   $the_authord= get_the_author_ID();
  7. if ($blogusersz) {
  8.   foreach ($blogusersz as $bloguser) {
  9.     $argsz = array(
  10.     'author' => $the_authord,
  11.           'showposts' => 1,
  12.           'orderby' => rand,
  13.           'caller_get_posts' => 1
  14.     );
  15.     $my_queryzz = new WP_Query($argsz);
  16.     if( $my_queryzz->have_posts() ) {
  17.       // $user = get_userdata($bloguser->user_id);
  18.       // echo 'This is one post for author with User ID: ' . $user->ID . ' ' . $user->user_firstname . ' ' . $user->user_lastname;
  19.       while ($my_queryzz->have_posts()) : $my_queryzz->the_post(); ?>
  20.         <a style="margin:7px;" href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php  the_post_thumbnail( array(50,50) ); ?></a>
  21. <?php
  22.       endwhile;
  23.     }
  24.   }
  25. }
  26. ?>