Reply To: Multisite: Not all sites showing up

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Multisite: Not all sites showing up Reply To: Multisite: Not all sites showing up

#2899

Ernest Marcinko
Keymaster

Hi!

Yes, I have an idea why. If the site flags are different from public/non spam/non archive then they won't show up by default. This restriction is going to be removed from the next version, but until then, here is a quick fix:

1. Open up the wp-content/plugins/ajax-search-pro/functions.php and go to line 245, where you should see this:

$blogs = $wpdb->get_results( $wpdb->prepare("SELECT blog_id, domain, path FROM $wpdb->blogs WHERE site_id = %d AND public = '1' AND archived = '0' AND mature = '0' AND spam = '0' AND deleted = '0' ORDER BY registered DESC", $wpdb->siteid), ARRAY_A );

2. Modify that line to:

$blogs = $wpdb->get_results( $wpdb->prepare("SELECT blog_id, domain, path FROM $wpdb->blogs WHERE site_id = %d ORDER BY registered DESC", $wpdb->siteid), ARRAY_A );

It should most likely solve the issue.

Best,
Ernest Marcinko

If you like my products, don't forget to rate them on codecanyon :)