您现在的位置是:首页 > 网站制作 > 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建站
很赞哦! ()
相关文章
- WordPress函数get_archives_link()
- WordPress函数single_month_title()
- WordPress函数single_tag_title()
- WordPress函数single_term_title()
- WordPress函数post_type_archive_title()
- WordPress函数single_cat_title()
- WordPress建站:如何调用当前文章的前5篇和后5篇
- WordPress函数:wp_get_archives根据日期显示日志归档详
- wordpress函数title()应用替换优化
- WordPress函数wp register sidebar widget添加自定义
随机图文
-
wp_reset_postdata 和 wp_reset_query 的作用与区别
什么时候使用wp_reset_query,什么时候用wp_reset_postdata? -
wordpress 上传的图片不显示的问题 base64,data:image/gif
-
wordpress发布文章HTML标签被自动过滤掉该如何处理?
wordpress发布文章时很多html标签都会自动过滤掉,造成了文章中无法添加<style></style><script></script>等标签。那么该如何如何处理呢? 解决方法一: 将wp-includes文件夹下 -
WordPress 页面模板(Page Template)下拉列表不显示的原因及解决方法
WordPress 的自定义页面模板是一个非常强大好用的功能,使用它新建一些静态页面(Page),添加上一些数据调用的函数,再在网页上做一个导航连接到对应的页面就可以实现很多自定义的功