函数文档

the_comments_pagination()

💡 云策文档标注

概述

the_comments_pagination() 函数用于在评论分页时显示导航链接,基于 get_the_comments_pagination() 实现输出。

关键要点

  • 函数功能:显示评论分页导航,适用于评论列表的分页场景。
  • 参数:接受可选数组 $args,参数详情参考 get_the_comments_pagination(),包括 screen_reader_text、aria_label 和 class 等。
  • 实现方式:直接调用 get_the_comments_pagination() 并输出结果,无返回值。
  • 相关函数:get_the_comments_pagination() 用于检索分页导航。
  • 版本历史:自 WordPress 4.4.0 版本引入。

📄 原文内容

Displays a paginated navigation to next/previous set of comments, when applicable.

Parameters

$argsarrayoptional
See get_the_comments_pagination() for available arguments.

More Arguments from get_the_comments_pagination( … $args )

Default pagination arguments.

  • screen_reader_text string
    Screen reader text for the nav element. Default ‘Comments pagination’.
  • aria_label string
    ARIA label text for the nav element. Default ‘Comments pagination’.
  • class string
    Custom class for the nav element. Default 'comments-pagination'.

Default:array()

Source

function the_comments_pagination( $args = array() ) {
	echo get_the_comments_pagination( $args );
}

Changelog

Version Description
4.4.0 Introduced.