Jan 21, 2010

WordPress: the_date() vs. the_time()

Today while at work, someone asked me about WordPress and once I heard the inquiry, I had the “oops” moment.

Person: There’s a problem with the date. Some of the entries don’t display the date on the archive pages.
Stephanie: Oh huh, that’s weird. Is it on the other blogs?
Stephanie’s brain: Dammit, I forgot about how the_date() and the_time() works different.

But I fixed the issue. Basically, when using WordPress, if you want to display the date on ALL the entries, you should be using the_time() function. However, if you only want it on the first entry of that day (as oppose to having it on ALL the entries), you want to use the_date function.

Simple tip, easy to forget. :]

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • MySpace
  • Reddit
  • StumbleUpon

Leave a Reply

CommentLuv Enabled