WordPress开发者和主题制作者的搜索引擎



next_posts ›

Since0.71
已弃用n/a
next_posts ( $max_page = 0, $echo = true )
参数: (2)
  • (int) $max_page Optional. Max pages. Default 0.
    Required: No
    默认:
  • (bool) $echo Optional. Whether to echo the link. Default true.
    Required: No
    默认: true
返回:
  • (string|void) The link URL for next posts page if `$echo = false`.
定义在:
文档:

Displays or retrieves the next posts page link.



源码

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