- サイトデザイン工事中です。ご意見をお寄せください。
- 赤色のリンクは、まだ日本語Codexに存在しないページ・画像です。英語版と併せてご覧ください。(詳細)
テンプレートタグ/get the date
提供:WordPress Codex 日本語版
< テンプレートタグ
タグ一覧: テンプレートタグ | インクルードタグ | 条件分岐タグ | その他の関数 | phpdoc
使い方: テンプレートタグ入門 | パラメータの渡し方 | 初心者の方へ | その他のテーマ関連資料
目次 |
説明
get_the_date テンプレートタグは、現在の $post が書かれた日付を取得します。the_date() とは異なり、このタグは 常に 日付を返します。'get_the_date' フィルターで出力を変更します。
使い方
<?php get_the_date( $d ); ?>
パラメータ
- $d
- (文字列) (optional) PHP date format.
戻り値
(string|null) Null if displaying, string if retrieving.
フィルター
-
apply_filters('get_the_date', $the_date, $d)
更新履歴
- 3.0.0 新規導入
用例
デフォルトの使い方
<span class="entry-date"><?php echo get_the_date(); ?></span>
ソース
get_the_date() は、wp-includes/general-template.php にあります。
最新英語版: WordPress Codex » Template Tags/get_the_date (最新版との差分)
Related
the_time, the_date, the_date_xml, the_modified_time, the_modified_date, the_modified_author, single_month_title, get_the_time, get_day_link, get_month_link, get_year_link, get_calendar