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`.
定义位置
  • wp-includes/link-template.php
    , line 2463
引入
0.71
弃用

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

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;
	}
}