How do I get posts by multiple post ID’s?

Posted by Prem Tiwari | Updated on

You can use get_posts() as it takes the same arguments as WP_Query. To pass it the IDs, use 'post__in' => array(43,23,65) (only takes arrays).

Something like:

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@] Your question and answer will appear on and help other developers.

Related Questions & Answers