WordPress Site Utility Plugin

There has been some discussion in recent weeks about the use of functions.php in the theme folder as oppose to using a plugin instead and the golden rule, in my opinion, is that anything that is not directly related to your WordPress theme should be in a plugin. Here I will outlined how I approach the issue.

Themes these days in WordPress mean you can do practically anything. In fact anything a plugin can do which means running any PHP code you want. However themes are interchangeable, and therefore if you include code in theme when the theme is not active that code will not run.

Therefore my advice, and this is something that I do with every WordPress project that I completed is to create a ‘utility’ plugin with each site. In this plugin is all the non theme related code for the site. Examples of the things I include in these plugins are as follows:

  • Custom post types
  • Custom taxonomies
  • Dashboard modifications

By including these in a plugin rather than a theme means a theme change in the future will not break that functionality of leave you with no custom post types.

Published by

Mark Wilkinson

Lead developer & owner at Highrise Digital @highrisedigital. Develops the @wpbroadbean plugins. Former teacher.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s