I need to get multiple posts in wordpress by ID.
get_posts('p=34,36');
I assumed that that might work, but it only gives the first post.
I tried then to use an array:
$args = array( 'p' => array(34,36));
That delivered no results.
get_posts('p=34+36');
NO and get_posts('p=34&p=36');
Last one only
Any ideas?
Be sure to check out http://codex.wordpress.org/Class_Reference/WP_Query as well, the section Interacting with WP_Query will be very valuable to you.
this may help you.