Why won’t my date conform to what I have set in “options”
-
I’m trying to add the date to my wp_get_archives generated list. (the page is here: http://tinyurl.com/ze6xd ) I’m monkeying around with the template-functions-general.php file and edited the “post-by-post” section to be the following:
} elseif ( ‘postbypost’ == $type ) {
$arcresults = $wpdb->get_results(“SELECT * FROM $wpdb->posts WHERE post_date < ‘$now’ AND post_status = ‘publish’ ORDER BY post_date DESC” . $limit);
if ( $arcresults ) {
foreach ( $arcresults as $arcresult ) {
if ( $arcresult->post_date != ‘0000-00-00 00:00:00’ ) {$date = $arcresult->post_date;
$url = get_permalink($arcresult);
$arc_title = $arcresult->post_title;
if ( $arc_title )
$text = strip_tags($arc_title, $date);
else
$text = $arcresult->post_title . “title”;
echo get_archives_link($url, $text . ” (” . $date . “)”, $format, $before, $after);However, $date gives me a full timestamp like this: 2006-08-24 16:03:22
I have the date format override turned off. What can I do to capture the date for each entry and display it like January 1, 2006?
- The topic ‘Why won’t my date conform to what I have set in “options”’ is closed to new replies.