• サイトデザイン工事中です。ご意見をお寄せください
  • 赤色のリンクは、まだ日本語Codexに存在しないページ・画像です。英語版と併せてご覧ください。(詳細

このWikiはいつでも誰でも編集できます

テンプレートタグ/get the date

提供:WordPress Codex 日本語版
移動: 案内, 検索

情報募集中 このテンプレートタグの説明やコードの書き方、活用例参考になるページがあったら、他のWordPressユーザのためにどんどん書き込みましょう! 該当部分を編集するか、このページのノートまたはフォーラム等で教えてください。

目次

説明

get_the_date テンプレートタグは、現在の $post が書かれた日付を取得します。the_date() とは異なり、このタグは 常に 日付を返します。'get_the_date' フィルターで出力を変更します。

使い方

<?php get_the_date( $d ); ?>

パラメータ

$d
文字列) (optionalPHP date format.
初期値: 日付フォーマット オプション (設定 > 一般 日付フォーマット)


戻り値

(string|null) Null if displaying, string if retrieving.

フィルター

更新履歴

用例

デフォルトの使い方

<span class="entry-date"><?php echo get_the_date(); ?></span>

ソース

get_the_date() は、wp-includes/general-template.php にあります。

このページ「テンプレートタグ/get the date」はまだ書きかけで、情報が不足しています。続きを書いて WordPress を手助けしましょう

最新英語版: 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


個人用ツール
名前空間
変種
操作
このサイトについて
特集
サーバ別情報
リファレンス
ドキュメント整備
ツールボックス
他の言語