the_author_posts()

介绍

the_author_posts() 显示作者已发布的文章数量,必须使用在 the_loop 中。

使用

<?php the_author_posts(); ?> 

示例

显示作者名称和已经发布的文章数量。

<p><?php the_author(); ?> has blogged <?php the_author_posts(); ?> 
posts</p>

显示结果

Harriett Smith has blogged 425 posts.

参数

不接受任何传参。

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注