I'm building a plugin that heavily modifies the commenting section of a blog page. It think that I cannot do this in a way that works with all themes — some CSS has to be tweaked, depending on the particular theme in use.

I'd guess that in the future, the plugin will also store some data in the database. So I suppose it should be a plugin, not a theme. (?)

Hence these questions:

  1. Is it possible to in some way indicate that a plugin works with only this and that theme?

  2. And then release some fairly simlar versions of the plugin, each version tweaked for a specific group of themes?

  3. Or are plugins supposed to work well with... all themes in existance?

  4. Can you think of some solution other than per-theme-plugins and/or forking-and-modifing-existing-themes? Perhaps child themes? But, no, then it would not be possible for users-of-my-child-theme to create their own child themes?

1 Answer 1


There is no way to bind it to a specific theme unless you contact theme authors and they link back to you at some point (on theme activation with yellow message on the top or in their admin menu etc). As you suggested yourself, a plugin is supposed to work with any theme.

Theme and plugin markets could handle this by indicating that their plugins work with their themes only but this is a corporate restriction and cannot be applied technically.

What could be do is when you release something, you could name and describe it so it's pretty much obvious (such as here - http://wordpress.org/extend/plugins/headway-views/ ). Also, in your plugin you could check for the currently activated theme (see get_current_theme ) and output some error message from within your plugin that it's inappropriate choice.

  • Thanks! I read in the headway-views FAQ that "This is a glue plugin for the Views plugin and the Headway theme", and, yes I suppose I'll do something like that then.
    – KajMagnus
    Jun 15, 2012 at 9:30
  • that's the only option without modifying others' codebase or checking inside of your plugin for the current theme as suggested above. Hope that it helps. Jun 15, 2012 at 10:12
  • 1
    Yes checking for the current theme could be a good idea. I could bundle CSS for many different themes in one single plugin, and then, depending on the result of get_current_theme, activate different CSS. That'd make it possible to build one single plugin that works with "most" popular themes :-)
    – KajMagnus
    Jun 15, 2012 at 10:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.