WordPress at a glance
filter is not described

comments_template_top_level_query_args filter-hook . WP 5.6.0

Filters the arguments used in the top level comments query.


add_filter( 'comments_template_top_level_query_args', 'filter_function_name_1514' );
function filter_function_name_1514( $top_level_args ){
	// filter...

	return $top_level_args;

The top level query arguments for the comments template.

  • count(true/false)
    Whether to return a comment count.

  • orderby(string/array)
    The field(s) to order by.

  • post_id(int)
    The post ID.

  • status(string/array)
    The comment status to limit results by.


Since 5.6.0 Introduced.

Where the hook is called

wp-includes/comment-template.php 1453
$top_level_args = apply_filters( 'comments_template_top_level_query_args', $top_level_args );

Where in WP core the hook is used WordPress

Usage not found.