The MU forums have moved to WordPress.org

Possible to get post by ID and blog ID? (2 posts)

  1. hmeister
    Member
    Posted 14 years ago #

    Is it possible to get a post by it's ID and the blog ID without having to switch blogs? I wish there was a function like query_posts() that could accept a blog id and only return posts within that blog.

    Sort of on a related note about performance, what are the performance impact on using switch_to_blog() in a loop that could potentially iterate hundreds of times?

    Thanks.

  2. andrea_r
    Moderator
    Posted 14 years ago #

    Sort of on a related note about performance, what are the performance impact on using switch_to_blog() in a loop that could potentially iterate hundreds of times?

    Huge. That function is expensive.

    If you're just pulling posts from one particular blog, gimmie a use-case.

About this Topic

  • Started 14 years ago by hmeister
  • Latest reply from andrea_r