You can do this using switch_to_blog( $id )
and restore_current_blog()
.
Within the theme of site1 you use the functions to fetch the content from site2. switch_to_blog()
causes the database queries to be made relative to the site you specify in the $id
parameter. When you're finished fetching the information, use restore_current_blog()
to return to the site 1 bank.
Ex:
$posts = new WP_Query(); // retorna os posts do site 1
switch_to_blog(2)
$posts = new WP_Query(); // retorna os posts do site 2
restore_current_blog();
$posts = new WP_Query(); // retorna os posts do site 1