[wp-trac] [WordPress Trac] #19627: Themes should be able to opt-in to a static front page
WordPress Trac
noreply at wordpress.org
Mon Jun 15 14:39:35 UTC 2015
#19627: Themes should be able to opt-in to a static front page
-----------------------------+-----------------------------
Reporter: nacin | Owner: koopersmith
Type: feature request | Status: assigned
Priority: normal | Milestone: Future Release
Component: Themes | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
-----------------------------+-----------------------------
Comment (by marius2012):
The frontpage.patch tries to add the option to select page templates for
the frontpage setting. In this way you no longer need to create a dummy
page for that template and assign it as a frontpage, you can just select
from the available templates in the theme ( http://prntscr.com/7h8cmb ) .
In order to do it i have added a new boolean parameter for
wp_dropdown_pages, named "include_templates" that will show also the
templates when is set to true.
A new feature that the patch is introducing is add_theme_support("custom-
frontpage", "template_file"); which will enable developers to set by
default a frontpage when the user is first installing the theme.
Basically, if the theme has this support, on after_switch_theme action we
will set the show_on_front = 'page' and page_on_front = "template_file" .
We will also save the old values of those settings and we will rollback
them when the theme is removed.
Let me know what do you think about this
--
Ticket URL: <https://core.trac.wordpress.org/ticket/19627#comment:50>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list