get_the_author_posts()
最后更新于:2021-11-27 01:25:19
get_the_author_posts()Retrieve the number of posts by the author of the current post.
响应
(int) The number of posts by the author.
源文件
文件: gc-includes/author-template.php
function get_the_author_posts() {
$post = get_post();
if ( ! $post ) {
return 0;
}
return count_user_posts( $post->post_author, $post->post_type );
}