Last active
August 27, 2017 19:16
-
-
Save jchristopher/8356313 to your computer and use it in GitHub Desktop.
Customize the number of words used when SearchWP's Term Highlight extension builds an excerpt containing at least one search term
This file contains 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 | |
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' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is it me, or is this filter no longer working in the latest versions?