Opened 9 years ago
Last modified 7 years ago
#36402 new enhancement
front-page.php behavior for child themes
Reported by: | cristovaov | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | minor | Version: | |
Component: | Themes | Keywords: | |
Focuses: | template | Cc: |
Description
Currently, if a parent theme has a front-page.php
template, child theme inherits this too.
I think this should not happen.
On this specific case, I think that a child theme should behave like a parent one.
The attached patch checks:
if * A child theme is NOT used or * A child theme is being used and includes 'front-page.php' then * Load 'front-page.php'
This allows a child theme to include its own front-page.php
template or setting the front-page to a page from the 'Reading' setting.
Attachments (1)
Change History (3)
#2
@
7 years ago
- Severity changed from normal to minor
I think that a child theme would expect to use the same templates as the parent unless the child theme did something about it. So the onus is on the child theme to add a filter for template_redirect
if it does not want to use the parent template.
All the other child themes that expect to get the parent template will then still work.
Patch function get_front_page_template()