get_day_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.

get_day_link() 描述

用法

 <?php get_day_link$year$month$day ); ?> 

get_day_link() 用法

参数

year

(boolean/integer) (必填) The year for the archive. Use '' to assign current year.

默认值: None

month

(boolean/integer) (必填) The month for the archive. Use '' to assign current month.

默认值: None

day

(boolean/integer) (必填) The day for the archive. Use '' to assign current day.

默认值: None

get_day_link() 参数

返回值

(string) 

The URL for the day's archive

get_day_link() 返回值

示例

Current Day as Link

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

Use With Variables

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.

get_day_link() 示例

源文件

get_day_link() 函数的代码位于 wp-includes/link-template.php.

get_day_link() 源文件

相关