• 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?

Viewing 1 replies (of 1 total)
  • Thread Starter buskerdog

    (@buskerdog)

    I haven’t solved this. I did however figure out how to truncate the time off it with substr($date, 0, -9) but the date still shows as 2006-08-24 which isn’t what I want. Any thoughts.

Viewing 1 replies (of 1 total)
  • The topic ‘Why won’t my date conform to what I have set in “options”’ is closed to new replies.