• When should I put new functionality in a plugin, and when should I add it to the theme (eg functions.php or custom page)? Is there some sort of broad guideline, or hard and fast rule?

    Also, is it bad form to put unrelated functionality in the same plugin if it only for my use? Like, is it better to have a plugin with as lot of tabs/sections or a multiple plugins?

    My Googling just keeps turning up How-To, rather than Why/When.

    Any information is appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • There’s no hard-and-fast rule for any of that. It all depends on what you think is the most logical place for it to go. Obviously, if the code is realyl gared towards the theme or is realyl only meant ot be used with one or very few themes, it should go in the theme. If you want to re-use the code on many sites, do it as a plugin to sve the hassle of moving everything around to extract that functionality from the theme each time.

    The same goes for your single plugin for your own use. If it’s all going ot be used in one spot and it’s not going to need to be broekn up anywhere, then do it as a single plugin, but if you might want ot break it up in the future, then do them selareately.

    Thread Starter jungalist

    (@jungalist)

    Excellent information. That is pretty much how I go about it but I wanted to make sure I wasn’t overlooking some grand design pattern.

    Thank you very much!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Create Plugin or Modify Theme?’ is closed to new replies.