Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ($author_posts) {
- echo '<ul>';
- $i = 0;
- foreach ($author_posts as $author_post) {
- /* excluded categories */
- if (has_category(explode(',', $atts['exclude']), $author_post->ID)) :
- continue;
- endif;
- $postdate = date_i18n( get_option( 'date_format' ), strtotime($author_post->post_date)).' - ';
- echo '<li>';
- echo ($atts['postdate'] ? $postdate : ''). '<a href="' . get_permalink( $author_post->ID ) . '">'.$author_post->post_title.'</a>';
- $categories = get_the_category( $author_post->ID );
- $list_cats =null;
- foreach ($categories as $cat) :
- $list_cats .= $cat->name.", ";
- endforeach;
- $list_cats = substr($list_cats, 0, -2);
- echo "<p>" .get_the_tags($author_post). "</p>";
- echo '</li>';
- $i++;
- if ($atts['postsperauthor'] > -1) :
- if ($i >= $atts['postsperauthor']) :
- break;
- endif;
- endif;
- }
- }
Add Comment
Please, Sign In to add comment