<?php
//displays all users with their avatar and their posts (titles)
$blogusers = get_users_of_blog();
if ($blogusers) {
foreach ($blogusers as $bloguser) {
echo '<div class="content-slider-body">';
$user = get_userdata($bloguser->user_id);
echo '<div class="grid col-140">' . get_avatar( $user->ID, 128 ) . '</div>';
$args=array(
'author' => $user->ID,
'post_type' => 'post',
'post_status' => 'publish',
'posts_per_page' => 1,
'caller_get_posts'=> 1
);
$my_query = null;
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) {
//echo 'List of Posts for ' . user->user_firstname . ' ' . $user->user_lastname;
while ($my_query->have_posts()) : $my_query->the_post(); ?>
<!-- post data -->
<div class="grid col-300">
<?php the_author_meta( 'author_status', $user->ID ); ?><br />
Contact form pop-up with pre-filled name
</div>
<div class="grid col-460 ee-post fit">
<h4><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h4>
<!--post-meta-->
<div class="post-data"><span class="date"><?php the_time('F jS, Y') ?></span> by <?php the_author_posts_link(); ?>
<?php if ( comments_open() ) : ?>
<span class="comments-link">
<?php comments_popup_link(__('Leave a Comment ↓', 'responsive'), __('1 Comment ↓', 'responsive'), __('% Comments ↓', 'responsive')); ?>
</span>
<?php endif; ?>
</div>
<br /><?php the_excerpt(); ?>
<!-- posted in categories -->
<div class="posted-cats">
<?php printf(__('<span style="color: #003c8d;">Filed under</span>: %s', 'responsive'), get_the_category_list(', ')); ?>
</div>
</div>
<!-- end post data -->
<?php echo '<span class="rsTmb">' . $user->user_firstname . ' ' . $user->user_lastname . '</span></div>'; ?>
<?php
endwhile;
}
wp_reset_query(); // Restore global post data stomped by the_post().
}
}
?>