Dates displaying weirdly
-
This is weird. I have four posts that I made on 11/20. One of them is fine, always displaying the date. The other three do not.
I edited the dates to a different date, and the display was fine.
Then I created a news post today, 12/15, and changed the date to 11/20. Again, it did not display the date.In the following code from the general template, the $day and the $previousday are the same on the ones that do NOT display a date.
So why does this happen, and only for 11/20, and how do I fix it?Thanks,
Davefunction the_date($d=”, $before=”, $after=”, $echo = true) {
global $post, $day, $previousday;
//echo $day . “/” . $previousday;$the_date = ”;
if ( $day != $previousday ) {
$the_date .= $before;
if ( $d==” )
$the_date .= mysql2date(get_option(‘date_format’), $post->post_date);
else
$the_date .= mysql2date($d, $post->post_date);
$the_date .= $after;
$previousday = $day;
}
//echo $the_date;
$the_date = apply_filters(‘the_date’, $the_date, $d, $before, $after);
if ( $echo )
echo $the_date;
else
return $the_date;
}
- The topic ‘Dates displaying weirdly’ is closed to new replies.