Switch to blog and get content from that blog

Anyone thinks this should not work? I can’t make it work for some reason.

add_action( 'wp_head', function() {
    switch_to_blog( $blog_id );
    wp_query( 'p=' . $post_id );
});

The point is that instead of displaying whatever page I am about to display, I choose content from a different blog instead.

Related posts

Leave a Reply

1 comment