previous_posts_link()WP 0.71

Displays the previous posts page link.

No Hooks.

Return

null. Nothing (null).

Usage

previous_posts_link( $label );
$label(string)
Previous page link text.
Default: null

Examples

0

#1 Display a link to the previous block of posts on the category page:

<?php previous_posts_link(); ?>
0

#2 Change the link anchor to your own: "« move backward":

<?php previous_posts_link( '«  move backwards' ) ?>
0

#3 Check if previous link exists

if( get_previous_posts_link() ) {
	previous_posts_link( '« Newer Entries' );
}

Changelog

Since 0.71 Introduced.

previous_posts_link() code WP 6.5.3

function previous_posts_link( $label = null ) {
	echo get_previous_posts_link( $label );
}