‘5’, ‘order’ => ‘DESC’,’post_status’ => ‘publish’ );
$recent_posts = wp_get_recent_posts( $args );
//Now lets do something with these posts
foreach( $recent_posts as $recent )
{
echo ‘Post ID: ‘.$recent[“ID”];
echo ‘Post URL: ‘.get_permalink($recent[“ID”]);
echo ‘Post Title: ‘.$recent[“post_title”];
//Do whatever else you please with this WordPress post
}
?>