Created
January 10, 2018 17:52
-
-
Save jchristopher/ab58242848a9eb076459e7cd40b1b6a5 to your computer and use it in GitHub Desktop.
Add support for ACF (Advanced Custom Fields) Repeaters in SearchWP (search all Repeater fields)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_searchwp_acf_repeater_keys( $keys ) { | |
$keys[] = 'staff_%'; // will match all ACF Repeater fields in the Staff repeater | |
return $keys; | |
} | |
add_filter( 'searchwp_custom_field_keys', 'my_searchwp_acf_repeater_keys' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment