searchwp\source\post\attributes\meta\ignored
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.
Parameters
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
|
4.0.0 |
Examples
All hooks should be added to your custom SearchWP Customizations Plugin.
Ignore additional meta keys
<?php | |
// Ignore additional meta keys in SearchWP. | |
add_filter( | |
'searchwp\source\post\attributes\meta\ignored', | |
function( $meta_keys, $args ) { | |
$meta_keys[] = 'my_not_useful_meta_key'; | |
return $meta_keys; | |
}, | |
20, 2 | |
); |