Include external php file in functions.php in WordPress theme

This is the code snippet to include an external PHP file into the functions.php file of the WordPress child theme.

include_once(get_stylesheet_directory() .'/your_external_file.php');
Need a helping hand in fixing your website issues?

If you are facing any problems in implementing these code snippets and tutorials, you can hire us to fix your website issues.

Hire Us