Languages: English • Italiano • 日本語 (Add your language)
Return the previous posts pages link. Param string $label Optional. Previous page link text.
<?php get_previous_posts_link( $label ); ?>
<?php $prev = get_previous_posts_link();
echo $prev;
?>
If you are using no-end-trailing slashes for your URLs. You may add following filter in your functions file to remove trailing slashes from generated links from get_previous_posts_links() function.
<?php
add_filter( 'get_pagenum_link', 'user_trailingslashit' );
?>
Since: 2.7
get_previous_posts_link() is located in wp-includes/link-template.php
.