Instantly share code, notes, and snippets.

Embed
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
<?php
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' );
@justlevine

This comment has been minimized.

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