- 赤色のリンクは、まだ日本語Codexに存在しないページ・画像です。英語版と併せてご覧ください。(詳細)
テンプレートタグ/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 The Loop. If no format parameter is specified, the Default date format (please note that says Date format) setting from Administration > Options > 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 > Options > 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 Formatting Date and Time.
Related
日時に関連するタグ: get_calendar(), get_day_link(), get_month_link(), get_the_date(), get_the_time(), get_year_link(), single_month_title(), the_date(), the_date_xml(), the_modified_date(), get_the_modified_date(), the_modified_time(), get_the_modified_time(), the_time()