How best to add code to your functions.php file

How many times have you seen a WordPress tutorial where you’re instructed to add a snippet of code to your functions.php file in order to add new functionality to your site? I’m sure we’re guilty of a few. The best practice is to create your own functionality plugin, instead of loading up your functions.php file with a ton of code.

One of the most important reasons for not doing this is to help you during upgrades and troubleshooting. If your site’s functions are broken up into a separate plugin, it will be easier to turn it on or off while trying to track down a problem or incompatibility. It’s much more difficult if all of those functions are loaded via your theme’s functions.php. Continue…