Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: how to retrieve the content of a specific page from each blog and display it in the blogs directory


Boone Gorges
Keymaster

@boonebgorges

If you want to get content from different blogs on a WPMU/WPMS installation on a single BuddyPress page, you’ll probably have to use the function switch_to_blog(), and its partner restore_current_blog(). For example, if you run switch_to_blog(5) from your BP blog (I’m assuming it’s blog #1), any blog-specific functions you run (such as query_posts) will be with reference to blog 5 instead of blog 1. Use restore_current_blog() to switch back to blog 1.

This method is pretty resource intensive, though, so it might not be the best choice if you’ve got a huge site.

Skip to toolbar