Skip to content

Instantly share code, notes, and snippets.

@jchristopher
Last active March 1, 2021 19:47
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/673332b0f554d08da7f250afffebafe5 to your computer and use it in GitHub Desktop.
Save jchristopher/673332b0f554d08da7f250afffebafe5 to your computer and use it in GitHub Desktop.
<?php
// ... this overrides the \SearchWP\Query instantiation found
// @link https://searchwp.com/documentation/search/supplemental-engine/
// e.g. $search_page is defined in the full snippet, this solely
// replaces the query to search across sites and return 'default' results.
$searchwp_query = new \SearchWP\Query( $search_query, [
'engine' => 'supplemental', // The Engine name.
'fields' => 'default', // Retain site ID info with results.
'site' => 'all', // Search all sites.
'page' => $search_page,
] );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment