Show author post count issue (3 posts)

  1. kateM82
    Posted 5 years ago #

    Hi all.

    I have been using this little snippet to show the post count for site authors and it works great EXCEPT if the author has no posts, and then it shows some crazy 2000+ number (what's weirder is that it shows a different number each time).

    The code I have been using is <?php the_author_posts(); ?>

    And you can see a dud example here http://dropdeadgorgeousdaily.com/author/amelieb/

    Would love some help, thanks!

  2. Michael
    Forum Moderator
    Posted 5 years ago #


    are you using the function within the loop?

    (it seems to echo the total number of posts if the author has no posts and if it is used outside the loop)

  3. kateM82
    Posted 5 years ago #

    Outside the loop (i think).

    It is being used to create an author info box at the top of the author archives page & in the sidebar as a widget on single pages.

    Is there any way to fix?

Topic Closed

This topic has been closed to new replies.

About this Topic