adjacent_posts_rel_link( string $title = '%title', bool $in_same_term = false, array|string $excluded_terms = '', string $taxonomy = 'category' )
Displays the relational links for the posts adjacent to the current post.
描述
参数
- $title
-
(string)
(Optional)
Link title format.Default value: ‘%title’
- $in_same_term
-
(bool)
(Optional)
Whether link should be in a same taxonomy term.Default value: false
- $excluded_terms
-
(array|string)
(Optional)
Array or comma-separated list of excluded term IDs.Default value: ”
- $taxonomy
-
(string)
(Optional)
Taxonomy, if $in_same_term is true.Default value: ‘category’
源代码
File: wp-includes/link-template.php
function adjacent_posts_rel_link( $title = '%title', $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ) {
echo get_adjacent_post_rel_link( $title, $in_same_term, $excluded_terms, true, $taxonomy );
echo get_adjacent_post_rel_link( $title, $in_same_term, $excluded_terms, false, $taxonomy );
}
更新日志
Version | 描述 |
---|---|
2.8.0 | Introduced. |
相关函数
Uses
-
wp-includes/link-template.php:
get_adjacent_post_rel_link()
Used By
-
wp-includes/link-template.php:
adjacent_posts_rel_link_wp_head()
User Contributed Notes
你可能对这些文章感兴趣:
- wordpress函数export_wp()用法示例
- wordpress函数extract_from_markers()用法示例
- wordpress函数export_add_js()用法示例
- wordpress函数export_date_options()用法示例
- wordpress函数esc_textarea()用法示例
- wordpress函数esc_url()用法示例
- wordpress函数esc_url_raw()用法示例
- wordpress函数esc_js()用法示例
- wordpress函数esc_sql()用法示例
- wordpress函数esc_html__()用法示例
- wordpress函数esc_html_x()用法示例
- wordpress函数esc_html()用法示例
- wordpress函数esc_html_e()用法示例
- wordpress函数esc_attr_x()用法示例
如有疑问,请前往问答中心反馈!
反馈