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
<?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.
标签 : wordpress函数 , WordPress建站
本文版权归原作者所有,转载请注明原文来源出处, WordPress教程网 感谢您的支持!
本文链接: http://www.wpcn.net/806.html
- WordPress手动升级详细步骤
- WordPress手动安全升级
- WordPress后台无插件显示文章和分类ID
- WordPress优化:wp_head和remove_action函数
- query_posts函数把你的wordpress博客变成CMS
- Bootstrap替换WordPress的get_search_form()…
- WordPress 函数:register_sidebar()创建主…
- wp_list_comments()使用回调函数自定义评论…
- WordPress过滤器(Filters):apply_filters和…
- WordPress函数:comments_template(加载评…
- WordPress函数:comment_form( )个性化评论…
- 无处不在的WordPress的主循环
- WordPress 函数do_action()详解和应用举例
- WordPress函数:add_menu_page()后台添加顶…
- WordPress函数:add_theme_page()后台添加设…
- WordPress函数:add_submenu_page()后台为顶…
- WordPress 函数:get_template_part()调用你…
- WordPress函数:load_theme_textdomain()(…
- WordPress 3D旋转彩色标签云
- WordPress文本小工具运行PHP
- WordPress无插件实现主题彩色标签云的N种方…
- WordPress函数:wp_tag_cloud(标签云)详解和…
- WordPress函数:register post type (自定义…
- WordPress使用register_post_type 函数创建…