[wp-hackers] is_front_page should have it's own template file

Otto otto at ottodestruct.com
Tue Apr 22 14:51:16 GMT 2008


... I don't quite get it, exactly. If you're using a static page as
the front page, why not simply assign it it's own Page Template?

I mean, I kinda see your point, but the "front" page is basically
either a Static-Page or home.php/index.php if you have posts on it.
Adding another template file doesn't make much sense, because there's
no room for it.

To explain further via the process of breaking it down:
Case 1: Posts on front page.
- Template is home.php fallback to index.php.
Case 2: Static front page.
- Template is custom Page Template fallback to page.php fallback to index.php.

Where, exactly, would you insert a front.php into that in each case?
What would be the purpose of it that could not be achieved otherwise?


On Tue, Apr 22, 2008 at 8:38 AM, Aaron D. Campbell <aaron at xavisys.com> wrote:
> Ozh wrote:
>
> > This is what got me confused. I don't get the point of having index.php
> and front-page.php...
> >
> > Ozh
> >
> >
>  For the same reason there is a home.php and an index.php. You can see the
> current hierarchy here: http://codex.wordpress.org/Template_Hierarchy
>
>  Most of the sites that I work on use a static page as the front page,
> moving the blog to another page (usually something like CompanyName Blog or
> CompanyName News), so I used the code contained in the is_front_page
> function pretty regularly. Currently the index.php is sort of a catch-all
> for anything that you DON'T have a file for. I personally think it should
> stay that way. I mean, we COULD just get rid of all of these pages, and use
> index.php and a bunch of conditionals (the same conditionals that are used
> not to decide what file to use), but the template files are there as a
> convenience. For me, and probably quite a few others that develop business
> sites (almost exclusively), it would be really nice to have.
>
>
>  _______________________________________________
>  wp-hackers mailing list
>  wp-hackers at lists.automattic.com
>  http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list