您现在的位置是:首页 > 网站制作 > WordpressWordpress

WordPress函数get_archives_link()

杰帅2023-08-06【Wordpress】人已围观

简介Description

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

<?php get_archives_link( $url, $text, $format, $before, $after ); ?>

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.

Tags:wordpress函数   WordPress建站

很赞哦! ()

文章评论

本站推荐

站点信息

  • 建站时间:2018-10-24
  • 网站程序:帝国CMS7.5
  • 主题模板《今夕何夕》
  • 文章统计1172篇文章
  • 标签管理标签云
  • 统计数据百度统计
  • 微信公众号:扫描二维码,关注我们