Sitewide wordpress plugins

Is there an easy hack to be able to access the data from the main blog install on all the sub-blogs?

We use a css menu plugin, as well as conditional php in our widgets, and want our links in our widgets to work sitewide. Seems like they are always pointing to a new db install for that particular blog.

Thanks!

  • Jonathan Elijah
    • Flash Drive

    Each blog is going to act independently, simply because they have separate db tables per blog. There are global plugins available through this site, but your still going to have to add them manually into each blog you want it on. Also, you can use the same theme and modify the theme files directly, adding the content you want, including widgets, and they will become available throughout the site; I am guessing this isn’t the option however, since you most likely have themes available for every member. In that case, you can edit every theme and add the content that way as well. A final method would be RSS from your main blog posted on the sub blog.

  • bluedot
    • Flash Drive

    Thanks for your replies.

    I am attempting to use navigation widgets on secondary blogs that reference the DB of the main blog, so I can keep menu’s automated.

    Yes, I can do site wide static, or specialized site wide mu plugins; but want to use the css drop down plugin, and be able to use things like this in my widgets:

    <?php wp_list_pages("title_li=&child_of=111"); ?>

    It just always points to the local blogs db. Is there any easy repoint, or would I have to write new plugins to accommodate this?

  • Andrew
    • Champion of Loops

    Hiya,

    You can try using the switch_to_blog function:

    <?php

    switch_to_blog( 1 );

    wp_list_pages(“title_li=&child_of=111”:wink:;

    restore_current_blog();

    ?>

    That *might* work. If it doesn’t then you’ll probably need to come up with a different way of pulling this off.

    Best of luck :slight_smile:

    Thanks,

    Andrew