1. 首页
  2. WordPress 函数手册

next_post_link()

next_post_link( string $format = ‘%link »’, string $link = ‘%title’, bool $in_same_term = false, array|string $excluded_terms = , string $taxonomy = ‘category’ )

显示与当前文章相邻的下一个文章链接。
Displays the next post link that is adjacent to the current post.

目录锚点:#说明#参数#返回#源码#笔记


说明(Description)

另见函数 get_next_post_link()


参数(Parameters)

参数 类型 必填 说明
$format (string) 可选 链接定位格式。默认“~%链接”。
$link (string) 可选 链接永久链接格式。默认的’%标题’
$in_same_term (bool) 可选 链接是否应该在同一个分类术语中。
$excluded_terms (array | string) 可选 排除的术语ID的数组或逗号分隔列表。
$taxonomy (string) 可选 分类法,如果$in_相同的术语是真的。

返回(Return)

无返回值


源码(Source)


更新版本 源码位置 使用 被使用
1.5.0 wp-includes/link-template.php:2133 0 1 function

笔记(Notes)

在同一类别内,不包括一个
粗体文章标题作为链接
在同一自定义分类中

next_post_link() 为WP2原创文章,链接:https://www.wp2.cn/functions/next_post_link/