• Hi,

    I am the administrator of a WordPress blog. Now I want to get the statistics of posts of authors on the blog, such as:

    1. How many posts are written and posted in a specific date range by a specific author?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • @chcw

    Hi! Thanks for writing. I google-searched to try and find a plugin that would do this, but on initial search didn’t find one.

    Are you able to go into the WordPress Dashboard and look at the list of posts and order by author and/or date? Maybe that will give you an idea.

    Another idea if you have access to the database and can run a SQL query, would be to run a SQL query that reports what you want to know.

    For example these queries would select *all the posts, or *all the users, respectively:
    SELECT * FROM wp_posts;
    SELECT * FROM wp_users;
    So building on that, if one wants to select the user_login and the count of that author’s posts, from the join of those two tables, for, say, the “mickey” user, for posts since, say, “2016-07-09” one can use a query like this:

    SELECT wp_users.user_login, count(wp_posts.post_author) FROM wp_posts JOIN wp_users ON wp_users.ID = wp_posts.post_author WHERE (wp_posts.post_type = 'post') AND ((wp_posts.post_status = 'publish') OR (wp_posts.post_status = 'future')) AND wp_users.user_login = 'mickey' AND wp_posts.post_date > '2016-07-09' GROUP BY wp_posts.post_author;

    Will you let me know how close this is, to being an option for you? And let me know how you go? (I mean let me know what you end up doing, towards getting the report of the authors?)

    Thread Starter chcw

    (@chcw)

    Hi, mjjojo,

    Thank you very much. I can see all the posts but it seems there are no way to sort them based on the author.

    I will try the SQL query method to see if it works.

    Thank you again.

    @chcw

    Great — will you let us know how it turns out?

    Or let us know how to think it through further along the way?

    Regards,

    mjjojo

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to get the statistics of posts for a specific author?’ is closed to new replies.