get_previous_posts_page_link(): string|void

Retrieves the previous posts page link.


Description

Will only return string, if not on a single page or post.

Backported to 2.0.10 from 2.1.3.


Top ↑

Return

string|void The link for the previous posts page.


Top ↑

Source

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

function get_previous_posts_page_link() {
	global $paged;

	if ( ! is_single() ) {
		$previous_page = (int) $paged - 1;

		if ( $previous_page < 1 ) {
			$previous_page = 1;
		}

		return get_pagenum_link( $previous_page );
	}
}


Top ↑

Changelog

Changelog
Version Description
2.0.10 Introduced.

Top ↑

User Contributed Notes

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