how I can use header.php and footer.php outside from wordpress theme directory

admin

Administrator
Staff member
I have a theme installed in wordpress like this directory
Code:
/wp-content/themes/mytheme
so in the root I have custom code which is little complex and easy to integrate in wordpress theme so I want to finding an option where I can use
Code:
header.php
and
Code:
footer.php
in root directory like this way.
Code:
/custom_code/custom.php