[wp-hackers] Using WP_Query to get posts ids
steve at sltaylor.co.uk
Tue Sep 13 10:33:55 UTC 2011
You could use $wpdb->get_col, but I'm guessing you need the nice
querying API of WP_Query?
If it's for caching anyway, why not do the query (returning all data),
parse the IDs out into another var with a loop, and cache that var?
On 13 September 2011 09:25, Lox <lox.dev at knc.nc> wrote:
> I would like to use the power of the WP_Query class to select only posts ids
> from the database. I do not want to query for all fields and to have all
> queried posts cached, for performance reasons.
> Is that possible?
> lox.dev at knc.nc
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers