Multisite: Not all sites showing up

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

This topic contains 2 replies, has 2 voices, and was last updated by sctcie sctcie 9 years, 5 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #2898
    sctcie
    sctcie
    Participant

    Sidenote: Our site is blocked from outside view until some things are set, so I cant give access right now.

    I network activated the plugin and began creating a search. However, a lot of my “sites” are not listed in the multisite tab. Any ideas why that could be? I can do screenshots and such if needed.

    Thanks,

    Thomas Harris

    #2899
    Ernest Marcinko
    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 :)


    #2900
    sctcie
    sctcie
    Participant

    It seems to work! Thanks Ernest.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.