Advertisements

get_previous_posts_page_link

Definition:
function get_previous_posts_page_link() {}

Retrieve previous posts page link.
Will only return string, if not on a single page or post.

Source code

function get_previous_posts_page_link() {

	global $paged;



	if ( !is_single() ) {

		$nextpage = intval($paged) - 1;

		if ( $nextpage < 1 )

			$nextpage = 1;

		return get_pagenum_link($nextpage);

	}

}

1645

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: