Displays or retrieves the next posts page link.
$max_pageintoptional
$displaybooloptional
Default:true
$display = false.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;
}
}
| Version | Description |
|---|---|
| 0.71 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/next_posts