Opened 11 months ago
Closed 9 months ago
#21147 closed defect (bug) (duplicate)
Found posts not filled correctly
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Query | Version: | 3.4 |
| Severity: | minor | Keywords: | |
| Cc: |
Description
Hi,
When i perform a custom WP_Query with the query 'fields'=>'ids' the found_posts is always 0 even if i have multiple pages of content like :
$q = new WP_Query( array( 'posts_per_page' => 1, 'fields' => 'ids' ) ); var_dump( $q->found_posts );
If i just remove the fields index, the found_posts is correct.
Attachments (1)
Change History (4)
comment:1
SergeyBiryukov — 11 months ago
wonderboymusic — 9 months ago
comment:2
wonderboymusic — 9 months ago
closed #21733 as a dupe. Patch handles all cases anyways. Attached.
comment:3
wonderboymusic — 9 months ago
- Milestone Awaiting Review deleted
- Resolution set to duplicate
- Status changed from new to closed
Sergey's patch on #14426 does the same thing
Note: See
TracTickets for help on using
tickets.

Related: #14426, #17066