next_comments_link()WP 2.7.0

Displays the link to the next comments page.

1 time — 0.00019 sec (fast) | 50000 times — 2.7 sec (fast)

No Hooks.

Return

null. Nothing (null).

Usage

next_comments_link( $label, $max_page );
$label(string)
Label for link text.
Default: ''
$max_page(int)
Max page.

Examples

0

#1 Display a link to the next page of comments

Let's say the post has 44 comments and we are on the second page of comments, then:

<?php next_comments_link() ?>

This code will output the following HTML:

<a href="http://example.com/foo/comment-page-3#comments">Following comments →</a>

Changelog

Since 2.7.0 Introduced.

next_comments_link() code WP 6.5.3

function next_comments_link( $label = '', $max_page = 0 ) {
	echo get_next_comments_link( $label, $max_page );
}