Filter: bricks/query_filters/index_args
Filters the query arguments used by the Query Filters indexer to find objects (posts, terms, users) that need to be indexed.
Parameters
Section titled “Parameters”$args(array): The query arguments (forWP_Query,WP_Term_Query, orWP_User_Query).$filter_source(string): The source of the filter data (e.g.,wpField,customField).$filter_settings(array): The settings of the filter element being indexed.$query_type(string): The type of query being run (wp_query,wp_term_query,wp_user_query).
Example usage
Section titled “Example usage”add_filter( 'bricks/query_filters/index_args', function( $args, $filter_source, $filter_settings, $query_type ) { // Example: Include 'private' posts when indexing if ( $query_type === 'wp_query' ) { $args['post_status'] = [ 'publish', 'private' ]; }
return $args;}, 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.