get_next_posts_page_link( int $max_page )

Retrieves the next posts page link.


Description Description

Backported from 2.1.3 to 2.0.10.


Parameters Parameters

$max_page

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


Top ↑

Return Return

(string|void) The link URL for next posts page.


Top ↑

Source Source

File: wp-includes/link-template.php

function get_next_posts_page_link( $max_page = 0 ) {
	global $paged;

	if ( ! is_single() ) {
		if ( ! $paged ) {
			$paged = 1;
		}
		$nextpage = intval( $paged ) + 1;
		if ( ! $max_page || $max_page >= $nextpage ) {
			return get_pagenum_link( $nextpage );
		}
	}
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.0.10 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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