Integrating blogs between to separate WordPress websites


The UK office and the rest of the world have a WordPress multi-site instance they share.

The Australia and New Zealand Offices want to share there own separate WordPress multi-site but they want to integrate their blog with the UK and rest of the world site.

I would like a point in the right direction for the best way to achieve this any recommendations are welcome and much appreciated.
Jeremy LeysTechnical LeadAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

James RodgersWeb Applications DeveloperCommented:
ok,  just to clarify....

the anz office want to integrate their blog with the rest of the world offices.
Are you meaning show the uk/can/den (for example) blogs on the anz site? or you want the anz office blogs on the uk/can/den sites?
James RodgersWeb Applications DeveloperCommented:
quick and dirty

to pull form other blogs to the ANZ site you need to do something along the lines of

// get thecurrent blog id, needed later
$original_blog_id = get_current_blog_id(); 

// get the blog you want to pull from
$blog_id = get_blog_id_from_url( '' );

switch_to_blog($blog_id); // this function neeeds an int, the blog id you want to interact with

then use
$latest_posts = get_posts($args);
$latest_posts = wp_get_recent_posts($args );

and process though a loop routine to output

// !!!!IMPORTANT!!!!
// switch back to your original blog !!!!!!

Open in new window

to get a listing of posts
you may want to gather all the posts from the different blogs into an array and sort them based on date posted before displaying them
also, if you are doing multiple sites, you just make an array of domains  and loop over it

$domains = array('', '','','','');

foreach($domains as $domain){
	$blog_id = get_blog_id_from_url( $domain );
	// etc...

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jeremy LeysTechnical LeadAuthor Commented:
Thank you works like a charm
Jeremy LeysTechnical LeadAuthor Commented:
Thank you this solved my problem
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.