next_posts( int $max_page, bool $display = true ): string|void

Displays or retrieves the next posts page link.


Parameters

$max_page int Optional
Max pages. Default 0.
$display bool Optional
Whether to echo the link.

Default: true


Top ↑

Return

string|void The link URL for next posts page if $display = false.


Top ↑

Source

File: wp-includes/link-template.php. View all references

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

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


Top ↑

Changelog

Changelog
Version Description
0.71 Introduced.

Top ↑

User Contributed Notes

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