WordPress Plugin or Custom Template?

I was playing around with WordPress, trying to create some custom functionality on a page and I quickly ran into a quandary. When do you put code in a plugin and when do you put it in your theme/child theme? It turns out the answer is not what you think, or at least what I thought. Continue reading