[wp-hackers] php hack to get rid of time in post?

Jen Simmons jensimmons.list at gmail.com
Fri Nov 23 22:31:06 GMT 2007


Ah, yes -- Callum's first suggestion didn't work. Christine's did.
I made the same (well a different variation of the same) mistake  
myself -- I knew to erase something, but snagged out the wrong one.

Now it works! Great, thanks everyone!

Jen

On Nov 21, 2007, at 9:36 pm, Christine Davis wrote:

> Are you sure?  That looks like it removes the time from the title  
> attribute.
>
> I haven't tested this d:  but it might be a little closer.  Closer,  
> or have
> php errors:
>
> <span class="entry-date"><abbr class="published" title="<?php the_time
> ('Y-m-d\TH:i:sO'); ?>"><?php unset($previousday); printf(__('%1$s',
> 'sandbox'), the_date('', '', '', false)) ?></abbr></span>
>
> On 11/22/07, Callum Macdonald <lists.automattic.com at callum- 
> macdonald.com>
> wrote:
>>
>> Let me get my spoon...
>>
>> <span class="entry-date"><abbr class="published" title="<?php
>> the_time('Y-m-d'); ?>"><?php unset($previousday); printf(__('%1$s
>> &#8211; %2$s', 'sandbox'), the_date('', '', '', false),  
>> get_the_time())
>> ?></abbr></span>
>>
>> Just remove the parts you don't need from the_time();
>>
>> Cheers - Callum.
>>
>> Jen Simmons wrote:
>>> I need my template (based on Sandbox) to only give the date of the
>>> post, not the time. I'm sure it's a simple php hack, but not knowing
>>> php that well.... and it's net to impossible to search the codex to
>>> find the code. So I though someone here could help.
>>>
>>> Right now:
>>> <span class="entry-date"><abbr class="published" title="<?php
>>> the_time('Y-m-d\TH:i:sO'); ?>"><?php unset($previousday);
>>> printf(__('%1$s &#8211; %2$s', 'sandbox'), the_date('', '', '',
>>> false), get_the_time()) ?></abbr></span>
>>>
>>> generates
>>> SEPTEMBER 12, 2007 – 4:59 PM
>>>
>>> I want it to just say
>>> SEPTEMBER 12, 2007
>>>
>>> What's the php?
>>>
>>> Thanks!
>>> Jen



More information about the wp-hackers mailing list