How often have you heard that in order to add custom code to your WordPress site you need to create a child theme and add the code to its
function.php file? I know, too often.
The good news – there is an easier way of doing it and that is by using the plugin called Code Snippets.
Once installed, you’ll have a section called Snippets added to your dashboard:
From here, click on “Add New” to create a new snippet:
Once you insert the code into the dedicated input area, click on “Save & Activate” and you are all set! You no longer need to worry about your snippet not working after a plugin or theme update since it is being run separately and stays intact during updates.
As always, feel free to reach out in comments or via Contact Form of the site.
Happy Snippeting! 🙂