When you create a theme, you can use functions.php
file for all utilize functions. Also this is the best place for all your require_once
calls.
One trick I would like to recommend for theme development approach:
Don’t use direct require_one
call to include your scripts. Instead of it, use locate_template
function to load scripts. By using this function, all child themes will be able to override your scripts. So for instance, you have file called utilize.php
, and it lies in inc
folder of your theme, then instead of calling require_once 'inc/utilize.php';
, call locate_template( 'inc/utilize.php', true, false );
.
Now it will be possible to create inc/utilize.php
file in a child theme and override parent file.