[wp-trac] [WordPress Trac] #39299: Twenty Seventeen: Allow child themes use Page Template as a front page
WordPress Trac
noreply at wordpress.org
Thu Dec 15 15:33:44 UTC 2016
#39299: Twenty Seventeen: Allow child themes use Page Template as a front page
---------------------------+-----------------------------
Reporter: sami.keijonen | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Bundled Theme | Version: 4.7
Severity: normal | Keywords:
Focuses: template |
---------------------------+-----------------------------
In Twenty Seventeen we use `frontpage_template` filter like this
{{{
function twentyseventeen_front_page_template( $template ) {
return is_home() ? '' : $template;
}
add_filter( 'frontpage_template', 'twentyseventeen_front_page_template'
);
}}}
But this means that child themes can't use Custom Page Template as a front
page if they want because `front-page.php` would always win over any page
templates.
1. Create a child theme.
1. Create custom page template.
1. Try to set that as front page. You can't because `front-page.php`
always wins.
In client/custom sites Custom Page Template as front page would be nice to
have so that you don't have to override `front-page.php` logic.
I'll add patch in a minute.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39299>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list