The MU forums have moved to WordPress.org

Automatically activate plugin on theme change (5 posts)

  1. hpatoio
    Member
    Posted 14 years ago #

    Hello.

    Is there a way to "connect" theme and plugin ?

    I've a WP MU installation and I would like that after creating a new blog when I activate the theme "A" also a set of plugin needed by that theme is activated.

    In the same way if later I switch to theme "B" all plugins for the theme A are deactivated and those for the theme B are activated.

    regards

    --
    Simone

  2. andrea_r
    Moderator
    Posted 14 years ago #

    If you put the plugin code in the theme's functions file, that'll do it.

  3. vectyr
    Member
    Posted 14 years ago #

    How would you do that exactly? Is it simple enough to explain or is there a tutorial somewhere?

  4. andrea_r
    Moderator
    Posted 14 years ago #

    It requires recoding the plugins. So no, not simple.

  5. rspindel
    Member
    Posted 13 years ago #

    This is pretty much all I do now on my WP custom builds. I try to go as close to a zero-plugin architecture as possible, where all extended features required for a theme are included in the theme files itself, bypassing the plugin architecture. This allows for "instant-on" of all needed features just by activating a theme.

About this Topic

  • Started 14 years ago by hpatoio
  • Latest reply from rspindel