Note: You are viewing the documentation for Version 3View Version 4 Docs


View the installation guide, browse the Knowledge Base, find out about SearchWP's many hooks, get support

Available since: 3.0


View Parameters »

Using this hook you can pre-process Custom Field content before it is sent to SearchWP’s highlighter:

// Pre-process Custom Field content before it is sent to SearchWP's highlighter.
add_filter( 'searchwp_th_pre_process_meta_value', function( $meta_value, $meta_key, $post_id ) {
// TODO: Customize $meta_value in any way you see fit.
return $meta_value;
}, 20, 3 );
view raw functions.php hosted with ❤ by GitHub


Parameter Type Description
$meta_value Mixed

Custom field content

$meta_key String

Meta key

$post_id Integer

ID of post being processed

Fix keyword search on your site. No coding required!

Now you can utilize all of the content that's gone unrecognized by native WordPress keyword search instantly with SearchWP

Get SearchWP