Per wordpress best practices, I created a child theme for an existing theme I have. Everything works fine until I try to add a template file which follows WP's template hierarchy conventions. For example, if I add category.php or archive.php, I get a white screen of death, and this is the error I get in Apache:
[:error] [pid 2919] [client 126.96.36.199:64974] PHP Warning: include(): Failed opening '/home/www-dev/beokinawa/wp-content/themes/x-child/index.php' for inclusion (include_path='.:/usr/share/php') in /home/www-dev/beokinawa/wp- includes/template-loader.php on line 74, referer: http://dev.bluepresley.com/beokinawa/wp-admin/edit-tags.php?taxonomy=category
Whenever I try to view a category after uploading either of those files, the system wants to load the category edit screen url it seems. What could cause that? You can also see from the error that it's trying to find index.php, the last in the template hierarchy. If category.php or archive.php are present then there would be no reason for it to look for that file, right?
That the issue would be permissions is interesting. Here is a breakdown of permissions.
- files are chown'ed user:www-root
- per wordpress documentation, files are 664 ( even changed the directory and files to 777 briefly, but that didn't work either)
It seems I cannot add any additional files from the wordpress template hierarchy scheme. But, editing template parts is fine. The parent theme comes with wp-header.php, wp-footer.php, etc, and I can add those and overrides happen correctly.