Created
April 24, 2017 15:42
-
-
Save jchristopher/f41adf7ec4c207c893039778d1192b9b to your computer and use it in GitHub Desktop.
LIKE matching Custom Fields in SearchWP
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_custom_field_keys_like( $keys ) { | |
$keys[] = 'acf_field_name_%'; // will match any Custom Field starting with acf_field_name_ | |
return $keys; | |
} | |
add_filter( 'searchwp_custom_field_keys', 'my_searchwp_custom_field_keys_like' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment