-
-
Save searchwpgists/7587fb8370d0d1484defba01d7f63929 to your computer and use it in GitHub Desktop.
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 | |
// ... 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