A WordPress-centric search engine for devs and theme authors



next_posts ›

Since0.71
Deprecatedn/a
next_posts ( $max_page = 0, $echo = true )
Parameters: (2)
  • (int) $max_page Optional. Max pages. Default 0.
    Required: No
    Default:
  • (bool) $echo Optional. Whether to echo the link. Default true.
    Required: No
    Default: true
Returns:
  • (string|void) The link URL for next posts page if `$echo = false`.
Defined at:
Codex:

Displays or retrieves the next posts page link.



Source

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