previous_comments_link()
Displays the link to the previous comments page.
1 time — 0.00019 sec (fast) | 50000 times — 2.7 sec (fast)
No Hooks.
Return
null
. Nothing (null).
Usage
previous_comments_link( $label );
- $label(string)
- Label for comments link text.
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.7.1
function previous_comments_link( $label = '' ) { echo get_previous_comments_link( $label ); }