Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

wordpress query multiple post ids

$myarray = array(144, 246, 537);
$args = array(
   'post_type' => 'post', // 'page' or 'custom-post-type-name'
   'post__in'      => $myarray
);
$the_query = new WP_Query( $args );
Source by wordpress.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #wordpress #query #multiple #post #ids
ADD COMMENT
Topic
Name
9+8 =