[wp-trac] [WordPress Trac] #40316: wp_count_posts() giving wrong result
WordPress Trac
noreply at wordpress.org
Thu Mar 30 13:50:37 UTC 2017
#40316: wp_count_posts() giving wrong result
-------------------------------+------------------------------
Reporter: subrataemfluence | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 4.7.3
Severity: normal | Resolution: invalid
Keywords: reporter-feedback | Focuses:
-------------------------------+------------------------------
Changes (by subrataemfluence):
* keywords: => reporter-feedback
* status: new => closed
* resolution: => invalid
Comment:
This is not relevant as `wp_count_posts` originally returns a number of
posts within a specific post type. If no post type is passed 'POST' is
taken as default. That's why I am getting 2. Closing this ticket as
invalid! `wp_count_posts` does not count how many records are present
inside a WordPress loop.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40316#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list