Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Manipulate Custom Field data before a post is indexed by SearchWP
function my_searchwp_get_custom_fields( $custom_fields, $post_id ) {
// manipulate the array of Custom Fields in any way you'd like
return $custom_fields;
add_filter( 'searchwp_get_custom_fields', 'my_searchwp_get_custom_fields', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment