Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › search all
This topic contains 4 replies, has 2 voices, and was last updated by Ernest Marcinko 9 years, 1 month ago.
- AuthorPosts
- August 4, 2015 at 10:04 pm #5499
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?
August 5, 2015 at 10:28 am #5503Hi
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 :)
August 5, 2015 at 11:49 pm #5536Hi 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.
August 6, 2015 at 12:48 am #5537In 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
August 6, 2015 at 10:28 am #5543That’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 :)
- AuthorPosts
You must be logged in to reply to this topic.