get_day_link

Sponsored Link

PHPでの使用のための特定の年、月、および1日まで毎日のアーカイブURLを返します。 それはURLを表示しません。 年、月、および日のパラメタがに決められるなら、タグは現在の日のアーカイブのためにURLを返します。

Sponsored Link

Returns the daily archive URL to a specific year, month and day for use in PHP. It does NOT display the URL. If year, month and day parameters are set to , the tag returns the URL for the current day’s archive.

タグ使用方法

<?php get_day_link('year', 'month', 'day'); >

Current Day as Link

リンクとしてPHPエコーコマンドと共にアンカータグの中にそれを表示することによって、URLを現在の日のアーカイブに返します。

Returns the URL to the current day’s archive as a link by displaying it within an anchor tag with the PHP echo command.

<a href="&amp;lt;?php echo get_day_link(<i>, </i>, <i>); ?>">Today's posts</a>

Use With Variables

PHPは使用のためにLoopの中でブロックをコード化します: 変数の$arc_year、$arc_year、および$arc_dayへのポストの年、月、および日を割り当てます。 これらはCCCタグと共に使用されます、PHPエコーコマンドと共にアンカータグの中にそれを表示して。(タグはそのポストのための毎日のアーカイブへのリンクとしてURLを返します)。 get_day_link()タグで使用される書式の記号列に関するインフォメーションに関してFormatting DateとTimeを見てください。

PHP code block for use within The Loop: Assigns year, month and day of a post to the variables $arc_year, $arc_month and $arc_day. These are used with the get_day_link() tag, which returns the URL as a link to the daily archive for that post, displaying it within an anchor tag with the PHP echo command. See Formatting Date and Time for info on format strings used in get_the_time() tag.

<?php
$arc_year = get_the_time('Y');
$arc_month = get_the_time('m');
$arc_day = get_the_time('d');
?>
<a href="<?php echo get_day_link("$arc_year", "$arc_month",
"$arc_day"); ?>">this day's posts</a>

Parameters

year

(integer) The year for the archive. Use to assign current year.

month

(integer) The month for archive. Use to assign current month.

day

(integer) The day for archive. Use to assign current day.

関連テンプレートタグ

edit_post_link, edit_comment_link,link_pages, wp_link_pages, get_year_link, get_month_link, get_day_link

Sponsored Link