Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
// 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->term_name;
}, $terms );
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.