The Custom Plugin vs. The Child Theme Functions


It’s a battle of the ages! In the red corner, weighing in at exactly one file: The ultra slim, light weight, nimble as a butterfly, custom plugin! In the blue corner, weighing in at a hefty two files and extra dependency: The glamorous, expandable, child theme!
Who will win this match for title belt of WordPress custom functionality?
Custom Functionality
If you are a WordPress developer then you know the need for custom functionality is pretty much a constant. I do a ton of work in WooCommerce and small pieces of code often do the simple jobs I need far easier and less cumbersome then full blown plugins.
The question is, where do we put this code? There’s a million ways to skin this cat, but I believe only two that are proper.
Create a child theme, add the code to the functions.php file
Create a custom plugin
DING! DING! DING!
WordPress Execution
Let’s talk about how WordPress handles this code for a minute. Typically, this custom functionality is going to be thrown into hooks. So when WP goes to execute the code in your theme’s functions or your custom plugin it will queue up the functionality where you tell it to.
So what’s the difference in using a plugin
Source: https://managewp.org/articles/13771/the-custom-plugin-vs-the-child-theme-functions




source https://williechiu40.wordpress.com/2016/11/05/the-custom-plugin-vs-the-child-theme-functions/