Skip to content

Instantly share code, notes, and snippets.

@jchristopher
Last active December 21, 2015 14:28
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jchristopher/eeab34945f977de707eb to your computer and use it in GitHub Desktop.
Use the searchwp_term_archive_enabled filter in the SearchWP Term Archive Priority Extension to specify which supplemental search engines should include term archive pages at the top of search results
<?php
function my_maybe_include_term_archive( $include, $engine, $terms ) {
// only have term archives included for supplemental search engine with name 'supplemental'
return ( $engine == 'supplemental' ) ? true : false;
}
add_filter( 'searchwp_term_archive_enabled', 'my_maybe_include_term_archive', 10, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment