WordPress:Template Tags/the modified date
Description
This tag displays the date (and time) a post was last modified. This tag works just like the_modified_time(), which also displays the time/date a post was last modified. This tag must be used within WordPress:The Loop. If no format parameter is specified, the Default date format (please note that says Date format) setting from Administration > Settings > General is used for the display format.
If the post or page is not yet modified, the modified date is the same as the creation date.
Usage
%%% <?php the_modified_date('d'); ?> %%%
Examples
Default Usage
Displays the date the post was last modified, using the Default date format setting (e.g. F j, Y) from Administration > Settings > General.
<p>Last modified: <?php the_modified_date(); ?></p>
Date as Month Day, Year
Displays the last modified date in the date format 'F j, Y' (ex: December 2, 2006).
<div>Last modified: <?php the_modified_date('F j, Y'); ?></div>
Date and Time
Displays the date and time.
<p>Modified: <?php the_modified_date('F j, Y'); ?> at <?php the_modified_date('g:i a'); ?></p>
Parameters
- d
- (string) The format the date is to display in. Defaults to the date format configured in your WordPress options. See WordPress:Formatting Date and Time.