get_the_time ( $format = '', $post = null )

  • (string) format Optional. Format to use for retrieving the time the post was written. Either 'G', 'U', or PHP date format defaults to the value specified in the time_format option. Default empty.
  • (int|WP_Post) post WP_Post object or ID. Default is global `$post` object.
  • (string|int|bool) Formatted date string or Unix timestamp if `$format` is 'U' or 'G'. False on failure.
Defined at:


Retrieve the time at which the post was written.

Related Functions

get_the_title, get_theme, get_the_date, get_the_id, get_themes

Top Google Results

User discussions

wpseek mobile