[wp-trac] [WordPress Trac] #31677: count_user_posts is not working in wordpress 4.1

WordPress Trac noreply at wordpress.org
Fri Jul 7 11:23:46 UTC 2017


#31677: count_user_posts is not working in wordpress 4.1
---------------------------------------------+-----------------------------
 Reporter:  stark.manish                     |       Owner:
     Type:  defect (bug)                     |      Status:  reopened
 Priority:  normal                           |   Milestone:  Awaiting
Component:  Posts, Post Types                |  Review
 Severity:  normal                           |     Version:  4.1
 Keywords:  reporter-feedback needs-testing  |  Resolution:
                                             |     Focuses:
---------------------------------------------+-----------------------------
Changes (by nishitlangaliya):

 * keywords:  reporter-feedback => reporter-feedback needs-testing


Comment:

 @jberculo , at SergeyBiryukov,

 {{{#!php
 <?php
 echo count_user_posts($author_id, $post_type);
 }}}

 Works for me, I tested with echo count_user_posts('1', 'product');
 it gave me perfect count for post type product. Please check for the same
 and let me know if i am missing.

 Thanks.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31677#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list