Answers for "wordpress query multiple post ids"

PHP
0

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 );
Posted by: Guest on February-15-2022

Browse Popular Code Answers by Language