Codex tools: Log in / create account
Contents |
Returns the time of the current post for use in PHP. It does not display the time. This tag must be used within The Loop.
This tag is available beginning with version 1.5 of WordPress. To display the time of a post, use the_time().
<?php get_the_time('format'); ?>
Returns the time of the current post using the WordPress default format, and displays it using the PHP echo command.
<?php echo get_the_time(); ?>
Assigns the time of the current post in seconds (since January 1 1970, known as the Unix Epoch) to the variable $u_time.
<?php $u_time = get_the_time('U'); ?>
See also the_time().
the_date_xml, the_date, the_time, the_modified_date, the_modified_time, get_the_time, single_month_title, get_calendar, the_weekday , the_weekday_date