Posts: 457
Name: Randy
Location: Northern Wisconsin
|
I have a situation where I would like to populate an array with variables.
(I am trying to work around(hack around) the Worpress lack of ability to query more than one post using query_posts(p=49).)
Here is a raw example:
I have an array $result which holds numbers only. (In this case, post ID results from a Wordpress query)
This is how to query more than one post as per WP forum moderator:
$args = array(
'post_type' => 'post',
'post__in' => array(65,49,32) // etc.
);
query_posts($args);
Of course, I'd like to stick the ID's that my $results array holds into this 'post__in' => array instead of manually inputting ID's(65,49,32 // numbers for example only) since it is dynamic data.
I hope I made this clear enough. Perhaps my brain is not working today!
Thanks in advance!
|