Skip to content

Instantly share code, notes, and snippets.

Created January 22, 2014 03:32
What would you like to do?
Modify which meta keys are excluded by the SearchWP indexer
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(
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