Skip to main content
added 387 characters in body
Source Link
gdaniel
  • 3.3k
  • 5
  • 29
  • 48

Don't use the_date(), instead use the_time().

the_date returns the date only, the_time returns the date + the time. I don't know the reason why wordpress won't return more than one date when the_date is used in a loop. But it has to do with the fact that the value is the same. If you use the_time the value is never the same, therefore it always returns the value. So you can print something like <?php the_time('F j, Y'); ?>

This link from the codex, explains how the_date works much better than I do.

Don't use the_date(), instead use the_time().

Don't use the_date(), instead use the_time().

the_date returns the date only, the_time returns the date + the time. I don't know the reason why wordpress won't return more than one date when the_date is used in a loop. But it has to do with the fact that the value is the same. If you use the_time the value is never the same, therefore it always returns the value. So you can print something like <?php the_time('F j, Y'); ?>

This link from the codex, explains how the_date works much better than I do.

Post Undeleted by gdaniel
Post Deleted by gdaniel
Source Link
gdaniel
  • 3.3k
  • 5
  • 29
  • 48

Don't use the_date(), instead use the_time().