[wp-hackers] WP_Query and multiple pages
admin at simply-basic.com
Mon Aug 3 19:32:53 UTC 2009
<?php query_posts(array("post__in" => array(21,2,3,4), 'post_type' =>
On Aug 3, 2009, at 2:20 PM, Ade Walker wrote:
> Hi all,
> If this has been down to death before - apologies in advance. I've
> for hours and haven't come up with anything definitive on this.
> It seems that trying to query several page_id's when using
> query_posts/WP_Query doesn't work.
> query_posts('page_id=1,2,3,4') doesn't work, and neither does:
> query_posts('post__in' => array(5,12,2,14,7)) where the ID's are
> Is there any way to query a selection of specified Pages? In usual
> situations (to display page content) I can see that there isn't much
> in being able to do this, but I want to access Custom field keys/
> values for
> a selection of Pages for a plugin.
> Other than an SQL query (which I'm using temporarily), any ideas
> received! :-)
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers