Created
July 24, 2022 18:24
-
-
Save SitesByYogi/14c042bf14418bdb3e3f9c66f6e0e955 to your computer and use it in GitHub Desktop.
Adds a custom functions file to your wordpress file struction. Be sure to create a new folder and connect it.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//========================================================= | |
// Add Custom functions file to WordPress | |
//========================================================= | |
$roots_includes = array( | |
'/theme-functions/theme-colors.php' | |
); | |
foreach($roots_includes as $file){ | |
if(!$filepath = locate_template($file)) { | |
trigger_error("Error locating `$file` for inclusion!", E_USER_ERROR); | |
} | |
require_once $filepath; | |
} | |
unset($file, $filepath); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment