get_the_date


get_the_date ( $d = '', $post = null )

Parameters:
  • (string) $d Optional. PHP date format defaults to the date_format option if not specified.
  • (int|WP_Post) $post Optional. Post ID or WP_Post object. Default current post.
Returns:
  • (false|string) Date the current post was written. False on failure.
Defined at:

Description

Retrieve the date on which the post was written.

Unlike the_date() this function will always return the date. Modify output with the {@see 'get_the_date'} filter.

Related Functions

get_theme_data, get_the_time, get_theme_updates, get_the_id, get_the_title

Top Google Results

User discussions

wpseek mobile