tags:

views:

39

answers:

1

Hello,

I am using a Wordpress blog theme created by someone named Scott Wallick. Here is his website. FYI, I'm using the "Barthelme" theme.

Anyway, this theme prints out the date as follows: August 5, 2009 is displayed as "2009 08 05". I would like to change the display to the following format: 5 Aug 2009.

How do I do this?

I found the function below in the Wordpress code. Could I just somehow change the code below to make it do what I asked above? If so, what changes should I make?

Thanks in advance,

John

function barthelme_date_classes($t, &$c, $p = '') {
    $t = $t + (get_option('gmt_offset') * 3600);
    $c[] = $p . 'y' . gmdate('Y', $t);
    $c[] = $p . 'm' . gmdate('m', $t);
    $c[] = $p . 'd' . gmdate('d', $t);
    $c[] = $p . 'h' . gmdate('h', $t);
}
+2  A: 

Try the following:

function barthelme_date_classes($t, &$c, $p = '') {
    $t = $t + (get_option('gmt_offset') * 3600);
    $c[] = $p . 'j' . gmdate('j', $t);
    $c[] = $p . 'M' . gmdate('M', $t);
    $c[] = $p . 'Y' . gmdate('Y', $t);
    $c[] = $p . 'h' . gmdate('h', $t);
}

I just changed the order in which every date element is stored, and used the format you asked for.

rogeriopvl
I tried this and it didn't change anything... any other ideas? Thanks.
John