Last active
June 18, 2022 01:07
-
-
Save jchristopher/0ecc4c6ed172f64e7a97748026266e32 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
// 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