Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <ul class="bloggerGrid">
- <?php
- $user_args = array(
- 'orderby' => 'display_name',
- 'order' => 'ASC'
- );
- $authors = get_users( $user_args );
- // Loop through users
- foreach ( $authors as $author ) {
- ?>
- <li class="theBlogger">
- <a href="<?php echo get_author_posts_url( $author->ID ) ?>" title="Read all posts by <?php echo $author->display_name; ?>">
- <?php echo get_avatar($author->ID, 50); ?>
- <h4><?php echo $author->display_name; ?></h4>
- <p><?php the_author_meta('description', $author->ID); ?></p>
- <?php // Setup loop for user post(s)
- $post_args = array(
- 'author' => '$author->ID',
- 'post_count' => 1
- );
- $auth_posts = new WP_Query( $post_args );
- if ( $auth_posts->have_posts() ) : while ( $auth_posts->have_posts() ) : $auth_posts->the_post();
- ?>
- <p><span class="leaderText">Latest Post:</span> <?php the_title(); ?></p>
- <?php
- endwhile; else :
- ?>
- <p>This author has not yet published any posts</p>
- <?php
- endif; wp_reset_query();
- ?>
- </a>
- </li>
- <?php } //End loops ?>
- </ul>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement