I have created a loop of posts in my wp homepage where 5 recent posts are shown one below the other. The code to loop wp data is
$args = array('numberposts'=>'5');
$recentposts = wp_get_recent_posts($args);
foreach($recentposts as $post){
$v = $post['ID'];
echo 'Title:'.get_the_title($v).'<br>';
echo 'Date:' .get_the_date($v).'<br>';
}
The Title section works perfectly, but Date section only shows the ID of the post and nothing else.
What am I doing wrong?