next_posts

函数
next_posts ( $max_page = 0, $echo = true )
参数
  • (int) $max_page Optional. Max pages. Default 0.
    Required:
  • (bool) $echo Optional. Whether to echo the link. Default true.
    Required:
    Default: true
返回值
  • (string|void) The link URL for next posts page if `$echo = false`.
定义位置
相关方法
next_postget_postsnext_posts_linkget_next_postget_post
引入
0.71
弃用
-

next_posts: 这个函数根据当前的查询检索WordPress循环中的下一组文章。如果有更多的文章要显示,它返回true;如果没有更多的文章,它返回false。

显示或检索下一个文章的页面链接。

function next_posts( $max_page = 0, $echo = true ) {
	$output = esc_url( get_next_posts_page_link( $max_page ) );

	if ( $echo ) {
		echo $output;
	} else {
		return $output;
	}
}

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2025-12-14 16:36:35

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: