【问题标题】:I want to know the post count by authors of my wordpress blog我想知道我的 wordpress 博客作者的帖子数
【发布时间】:2012-12-26 06:51:40
【问题描述】:

我想知道某个作者发布了多少帖子。例如。有 10 个作者,每个人都有帖子,现在我想知道作者发表的帖子数。

博客:viyugam.com

【问题讨论】:

    标签: php wordpress


    【解决方案1】:

    此函数为传递给它的 id 的用户返回帖子计数。 this可以帮忙

    【讨论】:

    • 我需要的是我是管理员,我想知道某个作者发布了多少帖子?
    【解决方案2】:

    使用单用户帖子

    count_user_posts( $userid );
    

    将数组中的user_id传递给此函数,以获取用户的帖子数

    count_many_users_posts($user_ids_array);
    

    参考:http://codex.wordpress.org/Function_Reference/count_user_posts

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-12-12
      • 2023-03-27
      • 2017-07-01
      • 2023-03-09
      • 2017-09-10
      • 2022-08-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多