Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
// Tell SearchWP to index only taxonomy term names instead of the entire WP_Term.
add_filter( 'searchwp\source\post\attributes\taxonomy\terms', function( $terms ) {
return array_map( function( $term ) {
return $term->name;
}, $terms );
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment