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


Since: 4.0.0

Table of Contents

By default SearchWP ignores meta keys that do not contain search-worthy content. You can customize which key(s) are ignored with this hook.


Type Parameter Default Since
Array $meta_keys Internal meta keys used by both WordPress and SearchWP that do not contain useful content 4.0.0
Array $args
Key Type Value
post_type String Post type name


All hooks should be added to your custom SearchWP Customizations Plugin.

Ignore additional meta keys

// Ignore additional meta keys in SearchWP.
function( $meta_keys, $args ) {
$meta_keys[] = 'my_not_useful_meta_key';
return $meta_keys;
20, 2

How to use this code

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