[wp-hackers] Non-existent path or document defaults to parent theme 404 template

Chip Bennett chip at chipbennett.net
Sat Nov 13 03:38:20 UTC 2010


Always include template-part files using get_template_part() - primarily,
for the reason you indicate (it will search first in the Child Theme, and
then in the Parent Theme).

Note: the Parent Theme should be including template-part files in the same
way.

Chip

On Fri, Nov 12, 2010 at 9:33 PM, Mikel <mikel at mahunneysfarm.com> wrote:

> Problem: Child theme with no 404 template defaults to parent theme 404 on
> non-existent path or document (as expected).  The parent 404 was fine for my
> purpose so I did not make a copy into the child theme folder.   My specific
> issue was with php include() files being pulled from the parent folder (due
> to relative file reference) instead of the edited versions I created in the
> child folder.
>
> I see that get_template_part works around this issue by searching
> STYLESHEETPATH and then TEMPLATEPATH and seems like a better way to include?
>  Or is include a bad idea with child themes?
>
>
> Mikel
>
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list