previous_comments_link()
Displays a link to the previous comments page.
See also: next_comments_link()
1 time — 0.00019 sec (fast) | 50000 times — 2.7 sec (fast)
No Hooks.
Returns
null.
Usage
<?php previous_comments_link( $label ) ?>
- $label(string)
- Text of the link.
Default: ''
Examples
#1 Display a link to the previous page of comments of the current post
Let's say the post has 44 comments and we are on the second page of comments, then:
previous_comments_link(); /* will output <a href="http://example.com/foo/comment-page-1#comments">← Previous Comments</a> */
Changelog
| Since 2.7.0 | Introduced. |
previous_comments_link() previous comments link code WP 6.8.3
function previous_comments_link( $label = '' ) {
echo get_previous_comments_link( $label );
}