get_the_author_posts()
Retrieves the number of posts by the author of the current post.
Хуков нет.
Возвращает
int
. The number of posts by the author.
Использование
get_the_author_posts();
Список изменений
С версии 1.5.0 | Введена. |
Код get_the_author_posts() get the author posts WP 6.5.2
function get_the_author_posts() { $post = get_post(); if ( ! $post ) { return 0; } return count_user_posts( $post->post_author, $post->post_type ); }