[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 02:13:54 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):
To add a bit further, in response to this argument (via Otto, who
articulates the opposing argument well):
> No, I agree with Michael Fields on that one. The front-page.php file
> should be used as the "front page" regardless of what the user has set
> to be on the front-page. If this is not desired, then the
> front-page.php file should be removed entirely.
>
> There's basically two use cases here:
>
> 1. Theme wants to always have the front page look the same way,
regardless of user choice. Solution: Use front-page.php. Done and done.
User choice then only affects the content of that front-page, by choosing
whether to use the blog posts or the content from a static Page.
>
> 2. Theme wants user choice to change the look of the front page.
Solution: Don't use front-page.php at all. Use home.php, which will always
be used for the blog posts regardless of location, then provide a special
Page Template (named something other than front-page.php) if the theme
wants to provide a special look for the static-page case. The user can
then choose to use that Page Template or not, as they desire.
Alternatively, you could just use page.php if the pages across the site
are all supposed to look special.
>
> There's no real good reason I can think of to have front-page.php check
for the blog-on-front case and load home.php instead. If that is the
desired use case, then front-page.php should simply not be included at
all.
Just because a Theme has an awesome static front-page template doesn't
mean that the user should be forced to use it. Presumably, the rest of the
Theme is just as awesome as the static front-page template. So, while some
users may opt to use the Theme with a static front page, other users very
well may want to use the Theme while displaying the blog posts index as
the site front page.
There's simply no reason for the Theme to trump user choice here, and in
this regard, the discussion very closely resembles the "WordPress-as-CMS"
Themes discussion held some time ago. The logical conclusion of that
discussion was that there was a trivial difference between supporting blog
posts and not supporting blog posts (the so-called "CMS" use of
WordPress), and that "WordPress as CMS" was therefore not a valid special-
use/niche case. I believe the same is true for static-page-as-front-page.
Just because a Theme provides the option doesn't mean that it should be
able to force users into using that option.
It makes even less sense to force a Theme to use "template-front-
page.php", and instruct the user to jump through an extra hoop (apply
template via Page Attributes) beyond the normal static-front-page
configuration steps, just to make the static front page option truly
*optional*. But that's essentially what you're arguing for.
IMHO, it makes infinitely more sense for WordPress simply to fall back
automatically to the home template when the user has specified to display
the blog posts index on the site front page.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23669#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list