If you are looking to add functionality to your existing WordPress site, the proper way to do that is to create a plugin.
Functions.php vs Plugin
When extending functionality to WordPress most beginners will drop code snippets into their theme’s functions.php file.
This is a good starting point for the solo person, new to WordPress.
But if you keep adding code snippets into your functions.php file, it will get messy quickly and there’s an increased probability that you’re going to cause a code conflict resulting in a PHP error which will bring down your site.
Also, if you keep adding your site’s functionality to the functions.php file, when you decide to change theme, it’s all gone.
You have to spend hours copying years worth of code and functions that you probably don’t even remember what they do or if they are needed.
Plugin Development
Moving your needed functionality into one or more plugins is the expert way to extend WordPress.
I use namespaces to prevent any code conflicts and everything is broken down into easy-to-understand classes that you can take to any other developer down the line and they will be able to support it.
Grouping your website extensions together into plugins also means that you are free to switch themes at any point without losing any critical website functionality.
Also, if you need to update how something works on your website, or if you no longer need it, you know exactly which plugin needs to be dealt with.
Clean and efficient!
Build a Plugin
Fill out the form below and I’ll get in touch as quickly as I can.