WordPress Multi-Site: Get Featured Image from Another Blog

Yesterday, David Bisset posted a tweet asking the following question:

Is there a function similar to get_the_post_thumbnail for multi-site (to grab a featured image from a post of a particular blog id)?

At the time, it seemed that the best way to do so was to use the Sitewide Tags plugin for WordPress, which, I believe, does offer some functionality similar to this (I haven’t used the plugin, yet, so I can’t say for sure).

WordPress Multi-Site: Switching Blogs

WordPressEarlier today, I was working on a new plug-in for one of my WordPress Multi-Site networks. I wanted to pull a list of top-level pages from each site/blog within the network, but I didn’t want the overhead of using the switch_to_blog() function. All I really wanted to do was to query the appropriate tables within the database, but, with WordPress Multi-Site’s implementation of table prefixes, there was no reliable way to attempt to ascertain the correct table name.

It took me a while to figure out how to do this, but I finally did figure it out.