previous_posts_link()

WordPress分类归档上一页函数

WordPress模板函数previous_posts_link用于在分类、函数、日期等归档页输出上一页链接,需要注意是用在The Loop主循环之外。

previous_posts_link( string $label = null )

函数参数

$label

字符串值,默认值:null

链接的锚文本,默认输出 « 上一页

函数使用示例

<?php 
	while ( have_posts() ) : the_post();
		the_title();
	endif;
	previous_posts_link();
?>

扩展阅读

previous_posts_link()函数位于:wp-includes/link-template.php

相关函数:

posts_nav_link()
next_posts_link()
get_next_posts_link()
get_previous_posts_link()
paginate_links()

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索