Updated the_date() function
-
function the_date($d='', $before='', $after='', $echo = true) {
global $id, $post, $day, $previousday, $newday;
$the_date = '';
$the_date .= $before;
if ($d=='') {
$the_date .= mysql2date(get_settings('date_format'), $post->post_date);
} else {
$the_date .= mysql2date($d, $post->post_date);
}
$the_date .= $after;
$previousday = $day;
$the_date = apply_filters('the_date', $the_date);
if ($echo) {
echo $the_date;
} else {
return $the_date;
}
}
I deleted theif ($day != $previousday)
If you want to use for every post the date, it doesn’t work with this if. This if should in my opinion be asked in The Loop or you have to use a fifth parameter to ask if the date should be with every blogitem or just 1 date per day.
updated: maybe not the correct subforum 😉 sorry about that
The topic ‘Updated the_date() function’ is closed to new replies.