Creating Multisite Shortcode that pulls latests posts from given blog ID

Context: Lets say, you want to build a Shortcode that pulls, latests posts from the blog ID specified in the shortcode. For example, [show_network_posts_ofid blog_id=”2″] should display first 10 posts of that blog. Solution:As always, you need to verify that Multisite is enabled using the is_multisite() function check. Next, use the switch_to_blog() function to switch to the Blog ID passed […]