Title: Custom Loop, need published date
Last modified: August 24, 2022

---

# Custom Loop, need published date

 *  Resolved [McFarnell](https://wordpress.org/support/users/mcfarnell/)
 * (@mcfarnell)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/custom-loop-need-published-date/)
 * Greetings!
 * I am doing a custom wp loop to list my events along with blog posts. I am sorting
   by published date, which works great. However, I would like to DISPLAY the published
   date with each event. Inside the loop, I am using the_date();. However, this 
   is displaying the event start date, not the published date. I’ve searched and
   searched and cannot find how to display the published date.
 * I know the published date is saved in the database somewhere, because it shows
   in the Dashboard area. Anyway I can print it out with the event post in the loop?
   Thank you!

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

 *  Plugin Support [WilloftheD](https://wordpress.org/support/users/abzlevelup/)
 * (@abzlevelup)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/custom-loop-need-published-date/#post-15952279)
 * Hi [@mcfarnell](https://wordpress.org/support/users/mcfarnell/), that’s a good
   question. **the_date()**, is the function used by WP by default. I also tried
   it and was able to get the same result, with the start date. I reached out to
   our team since there might be a certain variable or function to show the published
   date.
 * I’d get back to you as soon as I know more.
 * Best,
    Abz
 *  Thread Starter [McFarnell](https://wordpress.org/support/users/mcfarnell/)
 * (@mcfarnell)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/custom-loop-need-published-date/#post-15953943)
 * [@abzlevelup](https://wordpress.org/support/users/abzlevelup/) Thank you for 
   getting back to me. I finally found I could use this to get the published date:
   
   $date = mysql2date(‘F d, Y’, get_post_time(‘Y-m-d H:i:s’, true), false);
 *  Plugin Support [WilloftheD](https://wordpress.org/support/users/abzlevelup/)
 * (@abzlevelup)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/custom-loop-need-published-date/#post-15959173)
 * Hi [@mcfarnell](https://wordpress.org/support/users/mcfarnell/), I was able to
   confirm with one of our devs that you could use something like this as well:
 * `echo get_the_date( 'M d, Y', $event->ID )`
 * Let me know if this helps.
 * Best,
    Abz
 *  Plugin Support [WilloftheD](https://wordpress.org/support/users/abzlevelup/)
 * (@abzlevelup)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/custom-loop-need-published-date/#post-16003688)
 * Hey [@mcfarnell](https://wordpress.org/support/users/mcfarnell/), this thread
   has been inactive for a while, so we’re going to go ahead and mark it Resolved.
   Please feel free to open a new thread if any other questions come up, and we’d
   be happy to help.
 * Cheers,
    Abz

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

The topic ‘Custom Loop, need published date’ is closed to new replies.

 * ![](https://ps.w.org/the-events-calendar/assets/icon-256x256.gif?rev=2516440)
 * [The Events Calendar](https://wordpress.org/plugins/the-events-calendar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/the-events-calendar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/the-events-calendar/)
 * [Active Topics](https://wordpress.org/support/plugin/the-events-calendar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/the-events-calendar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/the-events-calendar/reviews/)

## Tags

 * [show date](https://wordpress.org/support/topic-tag/show-date/)

 * 4 replies
 * 2 participants
 * Last reply from: [WilloftheD](https://wordpress.org/support/users/abzlevelup/)
 * Last activity: [3 years, 8 months ago](https://wordpress.org/support/topic/custom-loop-need-published-date/#post-16003688)
 * Status: resolved