Reputation: 1055
Consider my WordPress multisite has the following four websites:
example-domain.com
example-domain.com/en
example-domain.com/cn
example-domain.com/ar
When a user searches for anything in the root site I want to search/query in all of the websites and display.
Do I have to use the switch_to_blog( $site_id );
function to switch sites one by one to search/query the tables of the website? or any other way to query all the posts
tables that exist for the multisite network?
Upvotes: 1
Views: 61