get_the_time – WordPress*リファレンス
PHPでの使用のために現在のポストの時間を返します。 それは時間を表示しません。 Loopの中でこのタグを使用しなければなりません。
このタグはWordPressのバージョン1.5がある利用可能な始めです。 ポストの時間を表示するには、the_time()を使用してください。
⇒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().
get_the_timeのテンプレートタグ使用方法
<?php get_the_time('format'); ?>
例
デフォルトの使い方
WordPress省略時書式を使用することで現在のポストの時間を返して、PHPエコーコマンドを使用することでそれを表示します。
⇒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 Time in Seconds
電流の時間の案配は秒(Unix Epochとして知られている1970年1月1日以来の)から可変$uに_時間を掲示します。
⇒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'); ?>
get_the_timeのパラメーター
format
(string) 時間が表示することになっている形式。 時間の形式へのデフォルトはあなたのWordPressでオプションを構成しました。 形式日時に遭遇してください。
⇒(string) The format the time is to display in. Defaults to the time format configured in your WordPress options. See Formatting Date and Time.
関連
⇒(string)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
関連記事


