[wp-trac] [WordPress Trac] #23669: Allow front page template to fall back to home template when site displays blog posts index on front page
WordPress Trac
noreply at wordpress.org
Sun Mar 3 01:40:48 UTC 2013
#23669: Allow front page template to fall back to home template when site displays
blog posts index on front page
-------------------------------------+------------------------------
Reporter: chipbennett | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Template | Version: 3.5.1
Severity: normal | Resolution:
Keywords: has-patch needs-testing |
-------------------------------------+------------------------------
Comment (by chipbennett):
Replying to [comment:4 mfields]:
> My understanding of front-page.php is that it should be used as the
template to display content when the user visits the "root" of the
WordPress installation. This is almost always accomplished by visiting the
url of the website. The awesome thing about front-page.php is that it
allows theme developers to always include certain elements regardless of
user's settings. Such elements might be a welcome message or featured
content areas.
>
> We started using this front-page.php on WordPress.com for newer themes
that include a post slider on the front page after receiving a grip of
support questions asking why featured content areas were not displayed on
sites even though the sliders had been configured correctly. In each case,
the user had their site configured to use a static page as their front
page. Using front-page.php allowed us to display the featured content in
both situations.
That stems from Themes not properly implementing the template hierarchy,
and really has no bearing on this proposed change, because for such users,
nothing would change.
Further, this change would have absolutely no impact on the wordpress.com
Themes that include `front-page.php`. The change would be completely
invisible to users who have set their site front page to display a static
page.
> The proposed change to template hierarchy would change the behavior of
themes that are using front-page.php as described by the Codex:
>
> front-page.php - Used for both Your latest posts or A static page as
set in the Front page displays section of Settings -> Reading
Yes. The intent is to change the described behavior/use of `front-
page.php`.
The problem is that developers - logically - don't account for the valid
user option of displaying the blog posts index on the site front page.
Typically (and almost exclusively), `front-page.php` is coded only to
display static front page content, and does not account for the need to
display the blog posts index.
Thus, what happens currently is that users can configure their site to
display the blog posts index as the site front page, and the Theme would
display the custom `front-page.php` content instead of the blog posts
index.
There are two alternatives:
1. Force developers to code `front-page.php` such that it behaves as
described in the Codex, which would require some variation of the
conditional output as shown in the ticket description
2. Make a simple, unobtrusive change to allow the front page to fall back
to the home template if the user has configured the site to display the
blog posts index as the site front page.
The second option is easier for both developers and end users.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23669#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list