the_author_posts()
Display the number of posts by the author of the current post.
Uses: get_the_author_posts()
1 time — 0.004421 sec (very slow) | 50000 times — 168.14 sec (extremely slow) | PHP 7.1.2, WP 4.7.3
No Hooks.
Return
null
. Nothing (null).
Usage
the_author_posts();
Examples
#1 Display the name of the author and his posts count:
<p><?php the_author(); ?> published <?php the_author_posts(); ?> posts</p>
Result: Jhon Smith published 425 posts
Changelog
Since 0.71 | Introduced. |
the_author_posts() the author posts code WP 6.7.1
function the_author_posts() { echo get_the_author_posts(); }