0
votes

I am using the twentyfourteen theme in WordPress to create a child theme. I wanted to make a custom header that included my company logo. However, when I add a header.php file to my child theme directory, the website's homepage will not load. I am able to access the admin functionality, but the live site is unavaialble.

I've added the exact copy of the header.php (no edits from twentyfourteen) to the child theme directory with no luck. I'm not sure what else to troubleshoot. The theme works fine with none or all other custom php files.

2

2 Answers

1
votes

My only thought would be that the code you're duplicating into your child theme's header.php references a function which you haven't defined in your child theme's functions.php file. This could be causing the white screen of death.

Try simply writing "Hello World" in your child theme's header.php and see if that outputs correctly. If it does then PHP is choking on something in the header.php file you're getting from twentyfourteen. This could be why it works when you copy all the files (including the ones that define the functions that header.php references).

Can't give much more direction without seeing the issue.

Hope that helps.

0
votes

I believe it boiled down to a permissions issue on the header.php file.

I installed a plugin called "Child Theme Configurator" and I was able to edit the files easily right through WordPress. When I FTP'd into server and tried editing the theme directly, my guess is that the header.php file had been inaccessible by the _www user, which is what what basic browsing is designated under. When editing theme files through WordPress, my assumption here is that it uses the _www user. Any edits to the theme files should therefore be viewable and editable by the browser.

Thanks for the extra help!