WordPress函数get_archives_link()

鱼见海资源网最新教程:

Description

Retrieve archive link content based on predefined or custom code.

The format can be one of four styles. The ‘link’ for head element,
‘option’ for use in the select element, ‘html’ for use in list (either
ol or ul HTML elements). Custom content is also supported using the
before and after parameters.

The ‘link’ format uses the link HTML element with the archives
relationship. The before and after parameters are not used. The text
parameter is used to describe the link.

The ‘option’ format uses the option HTML element for use in select
element. The value is the url parameter and the before and after
parameters are used between the text description.

The ‘html’ format, which is the default, uses the li HTML element for
use in the list HTML elements. The before parameter is before the link
and the after parameter is after the closing link.

The custom format uses the before parameter before the link (‘a’ HTML
element) and the after parameter after the closing link tag. If the
above three values for the format are not used, then custom format is
assumed.

Usage

Parameters

$url
(string) (required) URL to archive.
Default: None
$text
(string) (required) Archive text description.
Default: None
$format
(string) (optional) Optional, default is ‘html’. Can be ‘link’, ‘option’, ‘html’, or custom.
Default: html
$before
(string) (optional) Optional.
Default: empty string
$after
(string) (optional) Optional.
Default: empty string

Return Values

(string)
HTML link content for archive.

文章来源于互联网

© 版权声明
THE END
喜欢就支持一下吧
点赞216 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

夸夸
夸夸
还有吗!没看够!
取消
昵称表情代码图片

    暂无评论内容