Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2012
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. <?php
  2. $args = array(
  3. 'posts_per_page' => 5,
  4. 'author' => $post->post_author,
  5. 'post__not_in' => array($post->ID)
  6. );
  7. $recent_author_posts = get_posts($args);
  8. if($recent_author_posts) {
  9. echo '<ul>';
  10. foreach ( $recent_author_posts as $author_post ) {
  11. printf( __('<li><a href="%1$s">%2$s</a> - %3$s</li>'),
  12. esc_url( get_permalink($author_post->ID) ),
  13. $author_post->post_title,
  14. esc_html( get_the_date('', $author_post->ID) )
  15. );
  16. }
  17. echo '</ul>';
  18. }
  19. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement