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

Joefish joefish.hackers at feastofcrumbs.com
Thu Nov 22 02:40:10 GMT 2007


On 11/21/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.
>

I beg to differ. In this code sample, the_time() is used in the title
of <abbr>. That's a timestamp for hAtom support.

Since nothing is being passed to the_date() and get_the_time(), isn't
this an issue of setting the desired output in Options -> General?




> 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
> >
> >
> > Jen Simmons
> > jen at jensimmons
> > http://jensimmons.com
> > http://milkweedmediadesign.com
> > 917-455-0022
> > skype: jensimmons
> >
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
> >
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list