[wp-hackers] Using WP_Query to get posts ids

Lox lox.dev at knc.nc
Tue Sep 13 21:24:28 UTC 2011

2011/9/13 Ulrich Sossou <sorich87 at gmail.com>

> You can use the parameter 'fields':
> new WP_Query( array( 'fields' => 'ids' ) );

Thanks a lot, haven't noticed that undocumented parameter. You made my day.

Also the cache_results parameter seems to control the posts caching


lox.dev at knc.nc

More information about the wp-hackers mailing list