Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

How can i get search results from two different blogs [ www.mysite.com and www.blog.mysite.com ] using a single search form.

share|improve this question
add comment

3 Answers

up vote 4 down vote accepted

It depends on the setup; if they are setup as multisite, check this plugin: Multisite Global Search

If that doesn't work, I'd try custom Google search. They should allow you to search on both sites.

share|improve this answer
add comment

I tried Barry's idea!

I can retrive search results by switching two databases, but i cant show combined results. For example i have to show results from first blog and then i have to show the next blog's results.

I find pagination for the search results also difficult. So Google custom search is the easy and possible solution for this.

share|improve this answer
add comment

The other option would be to write a custom page where it searches one db switches db's search again and switch back. (or table prefix)

But without more information about your setup.

I'd go for Google Custom Search

share|improve this answer
    
Thanks guys! I would like to try Barry's idea. –  Lakshmanan PHP Jul 18 '12 at 12:18
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.