A WordPress-centric search engine for devs and theme authors



get_the_author_posts ›

Since1.5.0
Deprecatedn/a
get_the_author_posts ( No parameters )
Returns:
  • (int) The number of posts by the author.
Defined at:
Codex:

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



Source

function get_the_author_posts() {
	$post = get_post();
	if ( ! $post ) {
		return 0;
	}
	return count_user_posts( $post->post_author, $post->post_type );
}