WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Posting a Category from One Site to Another (8 posts)

  1. Point Clear Media
    Member
    Posted 3 years ago #

    Is there a way to use this type of array:

    <?php query_posts(array(
    'cat' => 13,
    'post_type' => array('post', 'page'),
    )); ?>

    To query posts from another blog within a multisite installation?

    In other words is there a 'blog_ID' => array variable or something like that?

  2. Michael Bishop

    Posted 3 years ago #

  3. Point Clear Media
    Member
    Posted 3 years ago #

    miklb

    That is a great function I never knew about.

    However, having tried it a little, all of the sidebar links go back to the other blog. I guess to be more exact, I want to have a separate site that draws certain articles from the main site, so that people logged into the separate site can have special download privileges.

    I guess I could just do something roles-based on the main site, but it would be better to send duplicate content that could be stripped down and manipulated to be displayed differently on the separate blog. Any other thought?

    Thanks!

  4. I normally don't recommend puling feeds across the network, but if it's just *one* site to another, you can get away with it.

  5. Point Clear Media
    Member
    Posted 3 years ago #

    Andrea,

    Thanks! I have been thinking about it and I still think the best thing to do would be to figure out a way to use query_posts to extract content from another blogs posts table.

  6. Then the above switch_to_blog, with the restore_current_blog in the right spot so it doesn't mess up your other stuff. ;)

    And the regular query posts in the middle - once you've switched to the specified blog, you don't have to specify it again in the query.

  7. Point Clear Media
    Member
    Posted 3 years ago #

    Andrea

    I think you are right. The next step, though is to figure out:

    1. How to change the permalinks of the posts being queried to stay within the secondary blog,

    and

    2. How get content to appear on the URL's that the new permalinks point to.

    Maybe still the best move is to just put extra permissions-based content on the primary blog.

  8. Yeah, if you're just doing it for that, I would suggest doing it on that blog only.

Topic Closed

This topic has been closed to new replies.

About this Topic