Home › Forums › Back End › Display date in recent post function › Re: Display date in recent post function
July 4, 2011 at 5:03 pm
#82826
Member
I’m not sure if this will work, but it’d be my first guess. I’m only posting the foreach section since it’s the only thing relevant:
foreach ($posts as $posts) {
$post_title = stripslashes($posts->post_title);
$permalink = get_permalink($posts->ID);
$thedate = get_the_date($posts->ID);
$output .= '' . htmlspecialchars($post_title) . '
';
$output .='' . $thedate . '
';
if($excerpts) {
$output.= '' . stripslashes($posts->post_excerpt) . '
';
}
$output .= 'Read More';
}