Title: Using the date twice
Last modified: August 18, 2016

---

# Using the date twice

 *  [thepete](https://wordpress.org/support/users/thepete/)
 * (@thepete)
 * [21 years, 6 months ago](https://wordpress.org/support/topic/using-the-date-twice/)
 * I’d like to put the date both at the top of the entries for that day, but also
   in the body of the post. Preferably, right before the time stamp. Here’s what
   I tried:
    `Filed under: <?php the_category() ?> by <?php the_author() ?> on  
   <?php the_date('', '<h2>', '</h2>'); ?> @ <?php the_time() ?> For some reason
   the date will not show up twice on the page. I even tried doing this: <?php the_date('','
   <h2>', '</h2>'); ?><?php the_date('', '<h2>', '</h2>'); ?> And that didn’t work,
   either. Anyone have any ideas? Thanks in advance!

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [TechGnome](https://wordpress.org/support/users/techgnome/)
 * (@techgnome)
 * [21 years, 6 months ago](https://wordpress.org/support/topic/using-the-date-twice/#post-110651)
 * There’s some code in the_date() function to only print it once (that’s how the
   date only gets prined once for each day while in the loop.) I had a similar prob,
   had to use the_time() instead… took a little finagling, but it works.
    TG
 *  Thread Starter [thepete](https://wordpress.org/support/users/thepete/)
 * (@thepete)
 * [21 years, 6 months ago](https://wordpress.org/support/topic/using-the-date-twice/#post-110668)
 * Sorry, I’m a n00b and not sure I follow you. How can I use the_time() instead
   of the_date() to display the date?
 *  Thread Starter [thepete](https://wordpress.org/support/users/thepete/)
 * (@thepete)
 * [21 years, 6 months ago](https://wordpress.org/support/topic/using-the-date-twice/#post-110684)
 * Ohhh, I see. Cool. Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Using the date twice’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [thepete](https://wordpress.org/support/users/thepete/)
 * Last activity: [21 years, 6 months ago](https://wordpress.org/support/topic/using-the-date-twice/#post-110684)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
