This file contains hidden or 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
add_filter( 'searchwp\query\mods', function( $mods ) { | |
$site_ids = array( 1, 2, 3 ); | |
$mod = new \SearchWP\Mod(); | |
$tax_sql = array(); | |
$posts_sql = array(); | |
$sql_where = array(); | |
$tax_query = array( | |
'relation' => 'AND', |
This file contains hidden or 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
add_filter( 'searchwp\query\mods', array( $this, 'add_taxonomy_to_multi_site_query' ), 10, 2 ); | |
/** | |
* Add taxonomy to multisite query | |
*/ | |
public function add_taxonomy_to_multi_site_query( $mods, $query ) { | |
global $wpdb; | |
global $institutions; // The site IDs, i don't like its a global, but legacy. | |
$mod = new \SearchWP\Mod(); |