apply_filters( 'relevanssi_acf_field_object', array $field_object, int $post_id )

Filters the Advanced Custom Fields field object array before Relevanssi indexes the field.


(array) The field object array from get_field_object().

(int) The post ID.

More information

When Relevanssi indexes ACF fields, there are checks to see whether the field should be included. Relevanssi fetches the field object as part of that process using ACF’s get_field_object() function. This filter hook lets you modify the field object before Relevanssi makes any decisions based on it.

If you return a null value or set the relevanssi_exclude to 1, Relevanssi will not index the field.