How to get a current post’s blog id

I’m resubmitting a question I previously asked, but crystalising it down to its ‘simplest’ form.

In a multisite network, how can one get the blog_id for where a post was originally published from?

Read More

It’s a simple question that should have a simple answer. We’re trying to determine the post’s blog_id from outside its originating blog (i.e. from another network blog or the main parent blog), so need some way of supplying an argument such as post_id.

Related posts

Leave a Reply

1 comment

  1. Here’s a quick way you could do it, though there are quite likely easier/better ways to do it. This is just what I can think of at the moment.

    Add a quick function to functions.php that will store the blog ID in the post meta. Then when you need to check where the post came from, just call get_post_meta() and check the value.