Last updated July 11, 2026, Version 0.34
This filter is documented in includes/query-loop.php
Auto-generated Example
add_filter(
'gatherpress_query_vars',
function(
array $query_args,
array $block_query,
GatherPress\boolean $inherited,
= null
) {
// Your code here.
return $query_args;
},
10,
3
);
Parameters
array$query_argsArguments to be passed to WP_Query.array$block_queryThe query attribute retrieved from the block.GatherPress\boolean$inheritedWhether the query is being inherited.- “
Returns
array $filtered_query_args Final arguments list.
Files
apply_filters(
'gatherpress_query_vars',
$query_args,
$parsed_block['attrs']['query'],
true,
)
apply_filters(
'gatherpress_query_vars',
$query_args,
$block_query,
false
)
apply_filters(
'gatherpress_query_vars',
$custom_args,
$request->get_params(),
false,
)