Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

get_post_time()

3 tags 1 category

get_post_time() — Retrieves the localized time of the post.

Inputs: $format (string): Optional. Format to use for retrieving the time the post was written. Accepts ‘G’, ‘U’, or PHP date format. Default ‘U’. $gmt (bool): Optional. Whether to retrieve the GMT time. Default false. $post (int|WP_Post|null): Post ID or post object. Default is global $post object. $translate (bool): Whether to translate the time string. Default false.

Returns string|int|false: Formatted date string or Unix timestamp if $format is ‘U’ or ‘G’. False on failure.

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…