Filter: bricks/query_filters/range_custom_field_meta_query
Filters the meta_query generated for a range filter (slider) targeting a custom field. This allows you to customize how the range comparison is performed (e.g., handling decimal values, changing the data type).
Parameters
Section titled “Parameters”$meta_query(array): The generatedmeta_queryarray (e.g.,['key' => '...', 'value' => [min, max], 'compare' => 'BETWEEN', 'type' => 'NUMERIC']).$filter(array): The active filter data, including settings and selected min/max values.$provider(string): The data provider (e.g.,acf,metabox).$query_id(string): The ID of the query loop being filtered.
Example usage
Section titled “Example usage”add_filter( 'bricks/query_filters/range_custom_field_meta_query', function( $meta_query, $filter, $provider, $query_id ) { // Example: Change type to 'DECIMAL' for precise price filtering if ( $filter['settings']['fieldName'] === 'product_price' ) { $meta_query['type'] = 'DECIMAL(10,2)'; }
return $meta_query;}, 10, 4 );Was this helpful?
A quick vote and short notes help us improve these docs faster.
Leave a note for us
Please do not include passwords, license keys, or personal data. We store submitted notes to improve the docs.
Thanks for sharing feedback. We're using it to improve these docs.