Filter: bricks/query_filters/custom_field_meta_query
Filters the meta_query generated for a custom field filter in the Query Filters system. This allows you to customize how the filtering logic is applied to the main query.
Parameters
Section titled “Parameters”$meta_query(array): The generatedmeta_queryarray (e.g.,['key' => '...', 'value' => '...', 'compare' => '...']).$filter(array): The active filter data, including settings and selected 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/custom_field_meta_query', function( $meta_query, $filter, $provider, $query_id ) { // Example: Change comparison to 'LIKE' for a specific field if ( $filter['settings']['fieldName'] === 'my_text_field' ) { $meta_query['compare'] = 'LIKE'; }
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.