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



next_posts › WordPress Function

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

Displays or retrieves the next posts page link.



源码

function next_posts( $max_page = 0, $display = true ) {
	$link   = get_next_posts_page_link( $max_page );
	$output = $link ? esc_url( $link ) : '';

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