HTTP/2 301
server: nginx
date: Sun, 28 Dec 2025 08:36:55 GMT
content-type: text/html; charset=UTF-8
x-olaf: ⛄
vary: accept, content-type
x-redirect-by: WordPress
location: https://developer.wordpress.org/reference/classes/wp_comment_query/query/
x-frame-options: SAMEORIGIN
alt-svc: h3=":443"; ma=86400
x-nc: MISS ord 2
HTTP/2 200
server: nginx
date: Sun, 28 Dec 2025 08:36:56 GMT
content-type: text/html; charset=UTF-8
vary: Accept-Encoding
x-olaf: ⛄
vary: accept, content-type
link:
; rel="https://api.w.org/"
link:
; rel="alternate"; title="JSON"; type="application/json"
link: ; rel=shortlink
x-frame-options: SAMEORIGIN
content-encoding: gzip
alt-svc: h3=":443"; ma=86400
x-nc: MISS ord 2
WP_Comment_Query::query() – Method | Developer.WordPress.org
WP_Comment_Query::query( string|array $query ): array|int
Sets up the WordPress query for retrieving comments.
$querystring|arrayrequiredArray or URL query string of parameters.
array|int List of comments, or number of comments when 'count' is passed as a query var.
| Version | Description |
|---|
| 4.2.0 | Moved parsing to WP_Comment_Query::parse_query(). |
| 4.1.0 | Introduced 'comment__in', 'comment__not_in', 'post_author__in', 'post_author__not_in', 'author__in', 'author__not_in', 'post__in', 'post__not_in', 'include_unapproved', 'type__in', and 'type__not_in' arguments to $query_vars. |
| 3.1.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.