One of the highlights of my WordCamp MSP 2010 experience was meeting and chatting with Ptah Dunbar a bit. Ptah is a consultant and WordPress developer at DevPress and contributed a good deal to the menu system in WordPress 3.0. He was at MSP to talk about theme frameworks—specifically his, WP Framework.
While we chatted, I asked his thoughts on a number of things, but one in particular stuck out. My question was: where should themes end and plugins begin? How much can a theme do before it is considered too much? Theme developers and plugin developers seem to give differing opinions at times. I was interested in Ptah’s thoughts because he has developed a number of themes and plugins.
His answer was pretty straightforward: if it’s something central to the functionality of a site, something that will need to remain when the theme is changed, it should be in a plugin.
And that answer resonated with me.
Rather than in our
functions.phpfile, I’ve moved them into a plugin called WPCandy Functionality.
I’m not altogether interested in disecting individual themes to say which involves more plugin functiaonlity over another, and just how much should be there.My thoughts are mostly focused on my own work, and how I prefer to build websites. I honestly feel that I’ll be changing the way I approach WordPress sites now.
Take WPCandy, for instance. We have a decent amount of functionality that is pretty central to the site’s operation. We have custom taxonomies that help us to organize post content. We will soon have custom post types too (wink wink). We have a number of functions used for displaying this custom information too—so important we’ll need all of them even when we update the site’s theme later.
So rather than contain all of these within our theme’s
functions.php file, I’ve moved them into a plugin called WPCandy Functionality. Now I have all site-specific functions required for the site in a safe place that I won’t lose during a future theme change.
And it feels right.
I’m reminded of Joost de Valk’s post and my response a few months ago, and the subsequent discussion afterward. I think I understood the issue before, but it was after talking with Ptah that it really “clicked” for me.
What about you? Do these thoughts “click” for you too? What is on your site that would best serve you in a custom plugin?