wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



get_the_author_posts › WordPress Function

Depuis1.5.0
Dépréciéen/a
› get_the_author_posts ( Pas de paramètres )
Retourne:
  • (int) The number of posts by the author.
Défini(e) dans:
Codex:

Retrieves 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 (int) count_user_posts( $post->post_author, $post->post_type );
}