Warning: Trying to access array offset on false in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 216
get_next_post_link() - 检索与当前文章相邻的下一个文章链接 - WordPress函数 - WordPress动力
当前浏览:首页 / WordPress函数 / get_next_post_link()

get_next_post_link( string $format = '%link »', string $link = '%title', bool $in_same_term = false, int[]|string $excluded_terms = '', string $taxonomy = 'category' )

检索与当前文章相邻的下一个文章链接


Warning: Undefined array key -1 in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/reference-cat.php on line 185

Warning: Undefined array key 4 in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/reference-cat.php on line 186

Warning: Undefined variable $searchand in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 154

Warning: Undefined array key "3743f043ec003c5dec15b1f60f641527" in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 223

Warning: Undefined variable $searchand in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 154

Warning: Undefined array key "a2aed7a81afea33ee837f1c18e79d0da" in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 223

Warning: Undefined variable $searchand in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 154

Warning: Undefined array key "c662a3ca6b84e8f01cc3765430bbe052" in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 223

linkmore...

next 下一...

postmore...


参数

$format

(string)(可选) 链接锚格式。默认值为'« %link'。

默认值: '%link »'

$link

(string)(可选) 链接固定链接格式。

默认值: '%title'

$in_same_term

(bool)(可选) 链接是否应在同一分类分类项(term)中。

默认值: false

$excluded_terms

(int[]|string)(可选) 排除的分类项(term)ID的数组或逗号分隔列表。

默认值: ''

$taxonomy

(string)(可选) 分类法,如果$in_same_term为true。

默认值: 'category'


返回

(string) 与当前文章相关的下一篇文章的链接URL。



源码

查看源码 官方文档


更新日志

版本描述
3.7.0开始引入

Warning: Undefined variable $o in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/reference.php on line 194