WPDev.one
Core Function
View Source on Trac ↗

get_the_date()

get_the_date( mixed $format = '', mixed $post = null )

Retrieves the date of the post.

Parameters 1 required

Name / Type Description
$format
string

Optional. PHP date format. Defaults to the 'date_format' option.

(int

| WP_Post) $post Optional. Post ID or WP_Post object. Default current post.

Required

Return Value

((string)
| int | false) Date the current post was written. False on failure.

Function Information

Since Version
3.0.0
Source File
wp-includes/general-template.php
Advertisement