how do you retrieve lots of posts, by their post_id
-
hello.
i am pretty close to figuring this out, but i’ve come up against a brick wall.i am trying to retrieve a number of posts, by post_ids only.
e.g. i want to display posts 1,5,24,32 and 48i have already collected the post_ids into a variable
e.g. $posts = ‘1,5,24,32,48’;and i am trying to print them out using this:
query_posts(array(“post__in” => array($posts)));but it only ever prints out the first post.
is there a different line that you have to use to get it to print out all the posts listed in the variable?
thanks for your help!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘how do you retrieve lots of posts, by their post_id’ is closed to new replies.