the_author_posts()WP 0.71

Display the number of posts by the author of the current post.

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

0

#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() code WP 6.5.3

function the_author_posts() {
	echo get_the_author_posts();
}