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 »

Note: Use of this hook will require a manual reindex

When indexing Custom Fields, SearchWP will check to make sure that a Custom Field is in use by engine configuration before indexing it. This is done to keep the index as small as possible. You can use this hook to control whether SearchWP thinks a particular meta key is in use:

Note: This applies to all post types across all engines.

add_filter( 'searchwp_is_used_meta_key', function( $used, $meta_key ) {
// TODO: Determine whether the meta key is in use.
return $used; // true/false
}, 20, 2 );
view raw functions.php hosted with ❤ by GitHub


Parameter Type Description
$used Boolean

Whether the meta key is used

$meta_key String

The meta key

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