search all

This topic contains 4 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 7 years ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #5499
    mitua
    mitua
    Participant

    Hi,

    In multisites, we have to drag and drop the blog where the search has to be carried upon.
    So everytime a new subsite is created , we would need to drag and drop that subsite for being searched.

    Is there a way where a ‘Search all the blogs’ can be given?I mean we don’t need to go again and again in the settings everytime a new subsite is created?

    There is something which mentions that if no blog is selected then ASP search the active blog?What does that men?Does it mean it searches all the blogs if nothing is drag and dropped?

    #5503
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi

    Well, this would be only possible by making tiny modifications to the code.
    Try opening up the wp-content/plugins/ajax-search-pro/search.php file and scroll to line 236, which should be empty. Add these lines there:

        
        $all_sites = wp_get_sites();
        $search['data']['selected-blogs'] = array();
        foreach ($all_sites as $_site) {
          $search['data']['selected-blogs'][] = $_site['blog_id'];
        }
    

    I haven’t tested this, but I’m guessing it should work.

    The active blog means the one that’s used at the moment. For example you have 10 sites and all of them have the ajax search widget on the sidebar. If you do a search on the first site, it will return results from the first, if you open the second site and do a search, it will return results from the second and so on…

    Best,
    Ernest Marcinko

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


    #5536
    mitua
    mitua
    Participant

    Hi Earnest,
    Thanks again for your reply.

    I will test this code for the time being.

    But I think as far as multisite is concerned this feature of searching all sites ‘as an option’ is a must and I would appreciate if you add this feature in your update of Ajax pro so that this option can be chosen from settings in a proper way.

    #5537
    mitua
    mitua
    Participant

    In continuation to above.

    No.I tested this.This code doesn’t work.Moreover when we have to search all blogs the dragging and dropping of individual blogs have to be disabled.

    Its requested to add ‘search all network sites’ option in the next update of the plugin.

    Amit

    #5543
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    That’s sounds like a fair and useful request.

    I will add this feature to the next version for sure.

    Best,
    Ernest Marcinko

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


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

You must be logged in to reply to this topic.