id summary reporter owner description type status priority milestone component version severity resolution keywords cc focuses 22273 Parent/child page template inheritance should be more consistent DrewAPicture "When page templates in sub-directories was introduced in 3.4, we also inadvertantly introduced some scenarios where page template inheritance from parent to child themes gets wonky. After some testing on trunk (r22290), I came up with some interesting findings in what I like to call ''Battle of the page template inheritance'': Relationship: Parent:Child Same filename, same Template Name: * root:root = Child wins * root:sub = Parent wins * sub:sub = Child wins * sub:root = Parent wins Different filename, same Template Name: * root:root = Parent wins * root:sub = Parent wins * sub:sub = Parent wins * sub:root = Parent wins Same filename, different Template Name: * root:root = Child wins * root:sub = Both available * sub:sub = Child wins * sub:root = Both available In [http://core.trac.wordpress.org/ticket/22269#comment:1 #22269], @duck_ made light of `get_page_templates()` making use of `array_flip()` which effectively gives preference to Parent templates in some situations. I think it's worth looking at whether we can't allow `get_page_templates()` to properly respect inheritance, regardless of sub or root path. The other interesting tidbit of course is that in the third set, we see the Child can override the parent file of the same filename, even if the Template Name is different, which I take is expected, but odd in terms of inheritance." enhancement closed normal Themes normal invalid