- 赤色のリンクは、まだ日本語Codexに存在しないページ・画像です。英語版と併せてご覧ください。(詳細)
テンプレートタグ/the modified date
このページ「テンプレートタグ/the modified date」は未翻訳です。和訳や日本語情報を加筆してくださる協力者を求めています。
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.
使い方
<?php the_modified_date('d'); ?>
用例
初期設定での使用
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).
<p>Last modified: <?php the_modified_date('F j, Y'); ?></p>
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>
パラメータ
- 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.
関連
日時に関連するタグ:
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()
最新英語版: WordPress Codex » Template Tags/the_modified_date (最新版との差分)