How to use wp_get_recent_posts with many post types?

Use post types as an array.

$args = array( 
    'numberposts' => '5', 
    'post_type'   => array('cpt1', 'cpt2', 'cptn') 
);
$recent_posts = wp_get_recent_posts( $args );

Leave a Comment

techhipbettruvabetnorabahisbahis forumutaraftarium24edusedueduedusedusedueduseduseduedus