Search
 
SCRIPT & CODE EXAMPLE
 

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 );
Comment

PREVIOUS NEXT
Code Example
Php :: upload file in laravel 
Php :: how to get last executed query in laravel 
Php :: where not null in laravel 
Php :: get template directory uri 
Php :: how to add attributes to an exsisting object in php 
Php :: php enter line break 
Php :: laravel eloquent where id not equal to 
Php :: php redirect 404 page not found 
Php :: laravel group routes 
Php :: php timer 
Php :: laravel new date 
Php :: get url with php 
Php :: laravel redirect back url with message 
Php :: php create an image 
Php :: laravel migration change column type 
Php :: deactivate auto update wordpress plugins 
Php :: php weekdays 
Php :: associative array sorting by value in php 
Php :: laravel elasticsearch migration in laravel 
Php :: laravel auth user_id 
Php :: PHP (WordPress) - Increase Maximum Upload File Size 
Php :: php list all constants 
Php :: Convert String to Date and Date-Time in PHP 
Php :: get array key based on value php 
Php :: laravel route logout 
Php :: php test page 
Php :: how to add values to an array in laravel 
Php :: laravel foreach iteration 
Php :: php year from date 
Php :: php if $_post 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =