Instantly share code, notes, and snippets.

What would you like to do?
Tell SearchWP's Term Highlight Extension to skip highlighting terms for searches performed with specific search engines
function my_searchwp_th_excluded_engines( $load_posts, $search_args ) {
// DO NOT highlight terms when using the 'my_supplemental' search engine
return array( 'my_supplemental' );
add_filter( 'searchwp_th_excluded_engines', 'my_searchwp_th_excluded_engines', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment