Title: get_page_of_comment_query_args
Published: August 11, 2020
Last modified: February 24, 2026

---

# apply_filters( ‘get_page_of_comment_query_args’, array $comment_args )

## In this article

 * [Description](https://developer.wordpress.org/reference/hooks/get_page_of_comment_query_args/?output_format=md#description)
    - [See also](https://developer.wordpress.org/reference/hooks/get_page_of_comment_query_args/?output_format=md#see-also)
 * [Parameters](https://developer.wordpress.org/reference/hooks/get_page_of_comment_query_args/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/get_page_of_comment_query_args/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/get_page_of_comment_query_args/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/get_page_of_comment_query_args/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/get_page_of_comment_query_args/?output_format=md#wp--skip-link--target)

Filters the arguments used to query comments in [get_page_of_comment()](https://developer.wordpress.org/reference/functions/get_page_of_comment/).

## 󠀁[Description](https://developer.wordpress.org/reference/hooks/get_page_of_comment_query_args/?output_format=md#description)󠁿

### 󠀁[See also](https://developer.wordpress.org/reference/hooks/get_page_of_comment_query_args/?output_format=md#see-also)󠁿

 * [WP_Comment_Query::__construct()](https://developer.wordpress.org/reference/classes/WP_Comment_Query/__construct/)

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/get_page_of_comment_query_args/?output_format=md#parameters)󠁿

 `$comment_args`array

Array of [WP_Comment_Query](https://developer.wordpress.org/reference/classes/wp_comment_query/)
arguments.

 * `type` string
 * Limit paginated comments to those matching a given type.
    Accepts `'comment'`,`'
   trackback'`, `'pingback'`, `'pings'` (trackbacks and pingbacks), or `'all'`. 
   Default `'all'`.
 * `post_id` int
 * ID of the post.
 * `fields` string
 * Comment fields to return.
 * `count` bool
 * Whether to return a comment count (true) or array of comment objects (false).
 * `status` string
 * Comment status.
 * `parent` int
 * Parent ID of comment to retrieve children of.
 * `date_query` array
 * Date query clauses to limit comments by. See [WP_Date_Query](https://developer.wordpress.org/reference/classes/wp_date_query/).
 * `include_unapproved` array
 * Array of IDs or email addresses whose unapproved comments will be included in
   paginated comments.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/get_page_of_comment_query_args/?output_format=md#source)󠁿

    ```php
    $comment_args = apply_filters( 'get_page_of_comment_query_args', $comment_args );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/comment.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/comment.php#L1149)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/comment.php#L1149-L1149)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/get_page_of_comment_query_args/?output_format=md#related)󠁿

| Used by | Description | 
| [get_page_of_comment()](https://developer.wordpress.org/reference/functions/get_page_of_comment/)`wp-includes/comment.php` |

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

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/get_page_of_comment_query_args/?output_format=md#changelog)󠁿

| Version | Description | 
| [5.5.0](https://developer.wordpress.org/reference/since/5.5.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fget_page_of_comment_query_args%2F)
before being able to contribute a note or feedback.