Skip to content

Instantly share code, notes, and snippets.

Last active Aug 27, 2017
What would you like to do?
Customize the number of words used when SearchWP's Term Highlight extension builds an excerpt containing at least one search term
function my_searchwp_th_num_words() {
// use 75 words instead of the default 55
return 75;
add_filter( 'searchwp_th_num_words', 'my_searchwp_th_num_words' );
Copy link

justlevine commented Aug 27, 2017

Is it me, or is this filter no longer working in the latest versions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment