next_posts()
Displays or retrieves the next posts page link.
No Hooks.
Return
String|null
. The link URL for next posts page if $echo = false.
Usage
next_posts( $max_page, $echo );
- $max_page(int)
- Max pages.
- $echo(true|false)
- Whether to echo the link.
Default: true
Changelog
Since 0.71 | Introduced. |
Code of next_posts() next posts WP 6.0
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; } }