[theme-reviewers] Custom home page in the theme
Chip Bennett
chip at chipbennett.net
Mon Sep 9 19:18:35 UTC 2013
Very little. And in fact, that's how I personally implement it, because
it's more flexible.
The problem with front-page.php is that it is generally used as a
featured-content display, with no consideration of the blog posts index -
and unless blog-posts-on-front is explicitly considered, it prevents the
user from displaying the blog posts index on the site front page.
Unless front-page.php accounts for the blog posts index, the
inclusion/exclusion of front-page.php results in two classes of Themes:
those that can display the blog posts index on the front page, and those
that can't. Front-page templates are great, and can be an awesome Theme
feature, but there is no reason that Themes should be differentiated on
that basis. There's no reason that a user should be prevented from using an
otherwise perfect Theme, merely because the Theme fails to account for the
blog posts index-as-front-page use case - a use case that is, as far as I'm
aware, still far more prevalent than the static page-as-front-page use case.
I proposed the idea of having the Template Hierarchy use either home.php or
front-page.php, dependent upon get_option( 'show_on_front' ) - but that
idea was fairly quickly shot down.
On Mon, Sep 9, 2013 at 3:07 PM, Otto <otto at ottodestruct.com> wrote:
> Question: What's the benefit of that over including a home.php and a
> custom Page Template for use by whatever static page the user chooses
> to use?
>
> -Otto
>
>
> On Mon, Sep 9, 2013 at 2:05 PM, Chip Bennett <chip at chipbennett.net> wrote:
> > Scratch that. Typed too fast:
> >
> > if ( 'posts' == get_option( 'show_on_front' ) ) {
> > include( get_home_template() );
> > } else {
> > // Custom front-page markup goes here
> > }
> >
> > The option is 'show_on_front', not 'front_page_displays'.
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20130909/e7b7d479/attachment.html>
More information about the theme-reviewers
mailing list