Skip to content

Instantly share code, notes, and snippets.

@jchristopher
Created January 10, 2014 15:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jchristopher/8356348 to your computer and use it in GitHub Desktop.
Save jchristopher/8356348 to your computer and use it in GitHub Desktop.
Tell SearchWP's Term Highlight Extension to skip highlighting terms for searches performed with specific search engines
<?php
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