Naming conventions for child templates
-
I’m seeing some odd behavior on a child theme, and I seem to have fixed it, but I wanted to confirm what the rules are for naming child theme page templates. I’m not talking about the actual filename, but the name that goes in the comment block at the top of the template file, ie:
<?php /* Template Name: Full Width BWB */ ?>
So for example, if the parent theme has a file “full-page.php” and in that file it has the above name, should the child theme have a different name?
The behavior I was seeing indicated that the name should be different, as WP seemed to be somewhat randomly pulling either the parent or child template. The child system also seems to get confused if you keep a “filename.bak.php” file around if you have a “filename.php” page template.
Any pointers on the naming issue? Couldn’t find that in the docs or most tutorials that focused more on css editing, child functions and adding page templates that do not exist in the parent.
- The topic ‘Naming conventions for child templates’ is closed to new replies.