next_posts( int $max_page, bool $echo = true )

Displays or retrieves the next posts page link.


Description Description


Parameters Parameters

$max_page

(int) (Optional) Max pages. Default 0.

$echo

(bool) (Optional) Whether to echo the link.

Default value: true


Top ↑

Return Return

(string|void) The link URL for next posts page if $echo = false.


Top ↑

Source Source

File: wp-includes/link-template.php

2298
2299
2300
2301
2302
2303
2304
2305
2306
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;
    }
}

Top ↑

Changelog Changelog

Changelog
Version Description
0.71 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.