WordPress分类归档上一页标签:previous_posts_link

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

相关函数:

阿里云