the_modified_time – WordPress*リファレンス

このタグは、ポストが最後に変更された時代(デートする)に表示して、the_time()の機能性と同様です。(the_time()は、ポストが作成された時間(と日付)に表示します)。 Loopの中でこのタグを使用しなければなりません。 形式パラメタが全く指定されないなら、Administration > Options > GeneralからのDefault日付の形式(Date書式を言う注意を喜ばせる)設定はシステム出力表示形式に使用されます。

ポストかページがまだ変更されていないなら、変更された時間は創造時間と同じです。

変更された時間と創造時間の両方を表示したいなら、あなたが使用に欲しいことができる、二度同じ時間/日付を示すのを避ける声明(例えば、e.g. if (get_the_modified_time() != get_the_time()))であるなら。

原文(翻訳元): ⇒This tag displays the time (and date) a post was last modified and is similar to the functionality of the_time(), which displays the time (and date) a post was created. 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 time is the same as the creation time.

If you want to display both the modified time and the creation time, you may want to use an if statement (e.g. if (get_the_modified_time() != get_the_time())) to avoid showing the same time/date twice.

the_modified_timeのテンプレートタグ使用方法

<?php the_modified_time('d'); ?>

デフォルトの使い方

ポストが最後に変更された時代(デートする)に、Administration > Options > GeneralからDefault日付の形式設定(例えば、F j、Y)を使用して、表示します。

原文(翻訳元): ⇒Displays the time (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_time(); ?></p>

Last modified: December 2, 2006

Time in the 12-hour format (am/pm)

ポストが午後10時36分に変更されたなら、ポストが形式パラメタが’g: i a’を結ぶ12時間に最後に変更された使用であったときに、この例は表示します。

原文(翻訳元): ⇒If a post was modified at 10:36pm, this example displays the time the post was last modified using the 12-hour format parameter string ‘g:i a’.

<p>Time last modified: <?php the_modified_time('g:i a'); ?></p>

Time last modified: 10:36 pm

Time in the 24-hour format

ポストが午後10時36分に変更されたなら、この例はポストが24時間の形式パラメタを使用することで変更された最終が’G: i’を結ぶということであった時代に表示します。

原文(翻訳元): ⇒If a post was modified at 10:36pm, this example displays the time the post was last modified using the 24-hour format parameter string ‘G:i’.

<p>Time last modified: <?php the_modified_time('G:i'); ?></p>

Time last modified: 22:36

Date as Month Day, Year

日付の形式タグを取り替えるのに使用することができた’F j、Y’(例えば、2006年12月2日)では_が_を変更した最後の変更された日時の表示は()の日付を入れます。

原文(翻訳元): ⇒Displays the last modified time and date in the date format ‘F j, Y’ (ex: December 2, 2006), which could be used to replace the tag the_modified_date().

<div>Last modified: <?php the_modified_time('F j, Y'); ?></div>

Last modified: December 2, 2006

日時

日時を表示します。

原文(翻訳元): ⇒Displays the date and time.

<p>Modified: <?php the_modified_time('F j, Y'); ?> at <?php the_modified_time('g:i a'); ?></p>

Modified: December 2, 2006 at 10:36 pm

the_modified_timeのパラメーター

d

(string) 時間が表示することになっている形式。 日付の形式へのデフォルトはあなたのWordPressでオプションを構成しました。 形式日時に遭遇してください。

原文(翻訳元): ⇒(string) The format the time is to display in. Defaults to the date format configured in your WordPress options. See Formatting Date and 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