WordPress filter hook
elementor/query/query_args
Fired by 8 WordPress plugins, running on 166K+ sites between them.
How to use elementor/query/query_args
It's a filter: your callback receives the value and 1 more argument, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'elementor/query/query_args', function( $query_args, $widget ) {
// Change $query_args here.
return $query_args;
}, 10, 2 );Argument names come from Shortcodes and extra features for Phlox theme's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
8 plugins that fire elementor/query/query_args
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
Shortcodes and extra features for Phlox theme80,000+ installs
apply_filters( 'elementor/query/query_args', $this->query_args, $this->widget )includes/elementor/modules/query-control/classes/elementor-post-query.php:105 -
Jupiter X Core70,000+ installs
apply_filters( 'elementor/query/query_args', $args, $this )includes/extensions/raven/includes/modules/loop-grid/widgets/loop-grid.php:1662 -
LA-Studio Element Kit for Elementor10,000+ installs
apply_filters( 'elementor/query/query_args', $this->query_args, $this->widget )includes/extensions/elementor/classes/post-query.php:124 -
Responsive Addons for Elementor3,000+ installs
apply_filters( 'elementor/query/query_args', $this->query_args, $this->widget )includes/widgets-manager/modules/query-control/classes/class-elementor-post-query.php:107 -
The Pack Elementor addon2,000+ installs
apply_filters( 'elementor/query/query_args', $this->query_args, $this->widget )includes/header-footer/includes/extensions/elementor/classes/post-query.php:124 -
MAS Elementor800+ installs
apply_filters( 'elementor/query/query_args', $this->query_args, $this->widget )modules/query-control/classes/elementor-post-query.php:165 -
Educat Elementor LMS Addon20+ installs
apply_filters( 'elementor/query/query_args', $this->query_args, $this->widget )admin/theme-builder/includes/extensions/elementor/classes/post-query.php:124 -
TCI Ultimate Element Themes10+ installs
apply_filters( 'elementor/query/query_args', $this->query_args, $this->widget )classes/tci-uet-modules/tci-uet-query-control/classes/elementor-post-query.php:122
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.