views:

39

answers:

3

What think to be consider when you prefer coding a solution in form of child theme rather then in form of a plugin ?

+1  A: 

Themes and plugins solve different problems: plugins are for business logic, themes for presentation. They are not interchangeable. I prefer the right tool for the right job. :)

toscho
+1  A: 

i prefer in child theme (or in function.php), rather then in form of plugin. It's more easy to reuse. You can just move it from one theme to another.

justjoe
A: 

Depends on the situation. If it's something that could readily be used by any (or many) different sites regardless of the theme, I do a plugin.

If it's something specific to This Particular Site Only, I would probably put it in the child theme's functions.php. Even if specific to the one particular site only, I might make it a plugin if it's something I might want to turn on and off later.

Other than the fact that you can turn plugins on and off, there is little if any difference between code in a plugin and code in functions.php.

If it's something most easily coded straight into the theme (e.g. a particular permutation of the_loop) then of course just do it in the theme template and put supporting code in functions.php

Strider