Title: Updated the_date() function
Last modified: February 7, 2017

---

# Updated the_date() function

 *  [Dextro](https://wordpress.org/support/users/dextro/)
 * (@dextro)
 * [21 years, 9 months ago](https://wordpress.org/support/topic/updated-the_date-function/)
 * `
    function the_date($d='', $before='', $after='', $echo = true) { global $id,
   $post, $day, $previousday, $newday; $the_date = ''; $the_date .= $before; if (
   $d=='') { $the_date .= mysql2date(get_settings('date_format'), $post->post_date);}
   else { $the_date .= mysql2date($d, $post->post_date); } $the_date .= $after; 
   $previousday = $day; $the_date = apply_filters('the_date', $the_date); if ($echo){
   echo $the_date; } else { return $the_date; } }  I deleted the  if ($day != $previousday)
   If you want to use for every post the date, it doesn’t work with this if. This
   if should in my opinion be asked in The Loop or you have to use a fifth parameter
   to ask if the date should be with every blogitem or just 1 date per day. updated:
   maybe not the correct subforum 😉 sorry about that

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

 *  [andrexng](https://wordpress.org/support/users/andrexng/)
 * (@andrexng)
 * [21 years, 7 months ago](https://wordpress.org/support/topic/updated-the_date-function/#post-82309)
 * Hi do u know where I can find the_date() function? Thanks…
 *  [Beel](https://wordpress.org/support/users/beel/)
 * (@beel)
 * [21 years, 7 months ago](https://wordpress.org/support/topic/updated-the_date-function/#post-82310)
 * that’s why we have the_time

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

The topic ‘Updated the_date() function’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 3 participants
 * Last reply from: [Beel](https://wordpress.org/support/users/beel/)
 * Last activity: [21 years, 7 months ago](https://wordpress.org/support/topic/updated-the_date-function/#post-82310)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
