Created
April 26, 2019 15:26
-
-
Save jchristopher/6123b52129f64fbc94189361056b37da to your computer and use it in GitHub Desktop.
Control the length of excerpts generated with SearchWP's highlighter
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 | |
// When highlighting, tell SearchWP to generate excerpts that are 75 words long. | |
add_filter( 'searchwp_th_num_words', function( $length ) { | |
return 75; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment