Accessing original WordPress blog’s DB from sub-blogs in network mode

I’m helping with a university radio station website that runs WordPress and was recently switched over to Network (Multi-site/multi-user) mode by myself. The setup is as such:

  1. The parent site (www.stationID.com) runs a bunch of custom-built plugins to construct things like the show schedule calendar, the “Now Playing” widget, podcast list, et cetera.

    Read More
  2. The new network websites (“wiki.stationID.com”, “buddypress.stationID.com” for instance) run the same template as the parent site, but it stops after rendering the first section because the widgets from point 1 grab data from the main site’s database that is not available to sub-blogs.

My question is: how do I get data from the main site’s tables on the sub-domain sub-blogs? A related question is: how do I set the $wpdb->prefix to be the same as the parent site on the child websites without it negatively effecting how the child website pulls data from its own database?

Any help would be awesome, thanks!

Related posts

Leave a Reply

1 comment