wpseek.com
WordPress开发者和主题制作者的搜索引擎



get_the_author_posts › WordPress Function

Since1.5.0
已弃用n/a
get_the_author_posts ( 没有参数 )
返回:
  • (int) The number of posts by the author.
定义在:
文档:

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



源码

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