Modify which meta keys are excluded by the SearchWP indexer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_searchwp_excluded_custom_fields( $keys ) { | |
// by default _wp_page_template is excluded but we want to include that | |
// so we'll return everything else we want excluded | |
$keys = array( | |
'_edit_lock', | |
'_edit_last', | |
'_wp_old_slug', | |
); | |
return $keys; | |
} | |
add_filter( 'searchwp_excluded_custom_fields', 'my_searchwp_excluded_custom_fields' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment