Developers
Queries
The query control filter
oxygen_query_control_query
Filter, $query. Every query the builder's query control produces, whether that's a
WP_Query argument array or a query string. This is the hook a faceted-search plugin uses to
opt Oxygen's loops into its filtering — Oxygen's own
FacetWP and
WP Grid Builder integrations use it.
add_filter('oxygen_query_control_query', function ($query) {
if (is_string($query)) {
return $query . '&facetwp=true';
}
$query['facetwp'] = true;
return $query;
});