[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:39:55 UTC 2016
#39299: Twenty Seventeen: Allow child themes use Page Template as a front page
---------------------------+------------------------------
Reporter: sami.keijonen | Owner:
Type: enhancement | Status: closed
Priority: normal | Milestone: Awaiting Review
Component: Bundled Theme | Version: 4.7
Severity: normal | Resolution: worksforme
Keywords: | Focuses: template
---------------------------+------------------------------
Changes (by JPry):
* status: new => closed
* resolution: => worksforme
Comment:
Replying to [ticket:39299 sami.keijonen]:
> 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.
> ...
> I'll add patch in a minute.
No need for a patch. A child theme (or plugin) just needs one line:
{{{#!php
remove_filter( 'frontpage_template',
'twentyseventeen_front_page_template' );
}}}
Alternatively, you can create your own function and hook it to the
`frontpage_template` filter to override what Twenty Seventeen is doing.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39299#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list