get_previous_comments_link()
Retrieves the link to the previous comments page.
1 time — 0.00019 sec (fast) | 50000 times — 2.7 sec (fast)
Hooks from the function
Return
String|null
. HTML-formatted link for the previous page of comments.
Usage
get_previous_comments_link( $label );
- $label(string)
- Label for comments link text.
Default: ''
Examples
#1 Get a link to the previous comments page the current post
Let's say the post has 44 comments, and we are on the second page of comments, then:
$prev_link = get_previous_comments_link(); /* $link will be equal to <a href="http://example.com/foo/comment-page-1#comments">← Previous Comments</a> */
Changelog
Since 2.7.1 | Introduced. |