Support » Networking WordPress » main site loop, displaying sub site posts

  • Resolved schneidley

    (@schneidley)


    I have a set of three sites on a wordpress network for my research group at my university. they are configured as follows:

    • example.com -> main site, set up as a cms. really does almost everything. all of the informational pages one would expect to see in a website are here. i am using the posts feature to house descriptions and links to documents.
    • example.com/directory -> i built a custom theme to display posts as a contact directory (i’m pretty proud, but this site is mostly irrelevant to the issue at hand)
    • example.com/news -> this site is a pure blog. the idea is to give each member of the group a “contributor” login, so they can post updates about their work as “news”. i made it a separate site for a few reasons, but it is tied in so a visitor can’t really tell it is a different site (i hope this makes sense).

    now for what i would like to accomplish: on the homepage of the main example.com site, i would like to place a widget that displays a teaser or the beginning of the most recent post on the example.com/news site, and display it the same as normal posts within the theme. i’m thinking a loop is the way to go here, but i have no idea how to call posts from a child site. on top of it all, i cannot directly access my MySQL DB to see how the posts in wp 3.0 are structured, because of IT’s permission setup.
    while i’m at it, i think it might be nice to also display on the homepage some of the most recently uploaded images or something of the sort. is any of this possible? also, i am trying to keep my plugin use to a minimum and keep the plugins simple to improve performance, but will use one if it is the only way.

    i think the place i need the most help is getting the information into the query function. i’m totally stuck. thanks for any help.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Go to your main site and look at the widgets.
    Find the RSS widget.
    Put in the feed for the News site.

    Oh, DUH (facepalm)! I think I’ve been staring at code for too long… Time for a break! I was WAY over-thinking it. not sure how long it would have taken me to come up with such a simple solution… Yours works great for my needs, thanks a million!

    the only thing I’ll note is I wouldn’t do this for a larger site or a number of sites.

    For just one, pulling the feed is fine. For a number of sites on the network, there are other ways. But I’ll leave that for other threads.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘main site loop, displaying sub site posts’ is closed to new replies.