[wp-trac] [WordPress Trac] #21147: Found posts not filled correctly
WordPress Trac
wp-trac at lists.automattic.com
Tue Jul 3 14:57:38 UTC 2012
#21147: Found posts not filled correctly
--------------------------+-----------------------------
Reporter: Rahe | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Query | Version: 3.4
Severity: minor | Keywords:
--------------------------+-----------------------------
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.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21147>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list