1

I have run into several themes, that clients have chosen, that have "companion plugins." These plugins have to be installed as a separate step after the theme is installed. What is the purpose/benefit of having this type of plugin, instead of just adding the functionality to the theme?

1 Answer 1

3

If you put your functionality in a plugin then it can be reused across many themes.

E.g. a plugin that adds font options to the customizer would be useful for lots of themes, but if it was directly built into every single theme and you needed to make a change, you would have to release updates for every single theme, then make sure there were no version differences and they were all kept up to date. That isn't an issue with a plugin.

Additionally, themes aren't intended to host functionality such as post types etc, only templates and visuals. Almost all themes break this advice though, but it's still useful. E.g functionality built into a theme locks you into that theme and is lost when you switch.

1
  • That makes sense as a structure, especially when there is a parent theme in the repository with a whole set of child themes that are also in the repository. Commented Jul 19, 2022 at 23:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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