Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Not all blogs are appearing on Multisite Blog Query › Reply To: Not all blogs are appearing on Multisite Blog Query
February 21, 2022 at 2:54 pm
#36862
Keymaster
It seems to be all right on my end at least. I tried an empty phrase to see what results do I get, and there are results from around the blogs: https://i.imgur.com/lORI3Zm.png
Try this corrected custom code:
add_filter( 'asp_results', 'asp_custom_remove_results', 10, 1 );
function asp_custom_remove_results( $results ) {
foreach ($results as $k=>&$r) {
if ( $r->content_type == 'term' && $r->blogid != get_main_site_id() ) {
unset($results[$k]);
}
}
return $results;
}