Support » Plugins » List post title of authors in his/her profile

  • I have 6 authors in my blog page. I have profile for each of the authors on the same page. I want to show the posts of the authors dynamically under their own profile. I tried the following but it didn’t work the way I expected. What changes should i make?

    function my_get_display_author_posts() {
    $current_author = get_query_var('author');
    $author_posts=  get_posts( 'author='.$current_author->id.'&posts_per_page=-1' );
     echo '<ul>';
    foreach ($author_posts as $author_post)  {
     echo '<li><a href="'.get_permalink($author_post->ID).'">'.$author_post- >post_title.'</a></li>';
    echo '</ul>';
  • The topic ‘List post title of authors in his/her profile’ is closed to new replies.