Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $args = array(
- 'posts_per_page' => 5,
- 'author' => $post->post_author,
- 'post__not_in' => array($post->ID)
- );
- $recent_author_posts = get_posts($args);
- if($recent_author_posts) {
- echo '<ul>';
- foreach ( $recent_author_posts as $author_post ) {
- printf( __('<li><a href="%1$s">%2$s</a> - %3$s</li>'),
- esc_url( get_permalink($author_post->ID) ),
- $author_post->post_title,
- esc_html( get_the_date('', $author_post->ID) )
- );
- }
- echo '</ul>';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement