To add custom functions to a WordPress theme could be as simple as adding them directly to the themes functions.php file. However, if you update that theme, those functions will be overwritten, losing the custom functionality that your site may depend on. One option is to setup a custom functions.php file.
Step 1
Create a folder within your child theme named “lib”
Step 2
Within the new “lib” folder, create a file named “my_functions.php”
Step 3
Paste this code in your my_functions.php file
<?php
//* My Custom Functions
Step 4
Save the file
Step 5
Paste this code in your themes current functions.php file
Step 6
Save the file