get_page_of_comment( int $comment_ID, array $args = array() ): int|null

Calculates what page number a comment will appear on for comment paging.


Parameters

$comment_ID int Required
Comment ID.
$args array Optional
Array of optional arguments.
  • typestring
    Limit paginated comments to those matching a given type.
    Accepts 'comment', 'trackback', 'pingback', 'pings' (trackbacks and pingbacks), or 'all'. Default 'all'.
  • per_pageint
    Per-page count to use when calculating pagination.
    Defaults to the value of the 'comments_per_page' option.
  • max_depthint|string
    If greater than 1, comment page will be determined for the top-level parent $comment_ID.
    Defaults to the value of the 'thread_comments_depth' option.