• Hi,

    The site I’m working on is for a school. It’s got a main site of largely static pages, but each school class has a blog which should be updated every week or so by the teacher.

    To get this working I installed multi site and set up each blog as a sub-site, separate from the main site. However I’m a bit stuck as to how best to integrate the two back again.

    The site has a custom theme. To get this working I created a new index.php which reads have_posts and that seems to work fine.

    However my left sidebar uses wp_list_pages. This presents two problems: first, in my blog sub-sites it displays the pages from the sub-site rather than the main site. Is there any way I can make it read the page list from another site/address?

    The second issue is that “class blogs” is a header page in the main site. On that page there should be a list of the blogs, and in the menu it should have children corresponding to the sub-sites.

    I presume this can’t be managed automatically in the sense that wp_list_pages can magically be made to include blogs from sub-sites as child items. But I don’t know how best to manage it. Do I need to create a page in the main site to host each blog? If so, how do I modify index.php for my theme to detect that it needs to load a blog and load the appropriate content? Or is there a better way?

    Cheers,
    Matt

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    How often do these pages/menus change?

    Thread Starter mattthr

    (@mattthr)

    Yearly. Hard-coding them is an option. But I’d prefer to have the platform running as automated and idiot-proof as possible, otherwise it’ll be me making the changes when it should be the people in charge of the content.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    You could use switch_to_blog to *ahem* switch to site 1, pull in the pages, and then go back.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Integrating multi-site blogs in parent site’ is closed to new replies.