[wp-testers] Archive of pages uses home.php template

Andrew Nacin wp at andrewnacin.com
Sun Apr 3 16:53:08 UTC 2011


On Apr 3, 2011 12:38 PM, "scribu" <mail at scribu.net> wrote:
>
> On Sun, Apr 3, 2011 at 7:16 PM, <michael at mfields.org> wrote:
>
> > The reason I recognized this as a bit strange was that I was expecting
the
> > query to go straight to index.php. I have always thought home.php was
> > responsible for displaying posts having the 'post' post_type. Having it
> > display an archive of any other post_type just seems odd to me. Please
let
> > me know if I am wrong in my impression of what home.php should be doing.
> >
>
> home.php should display the homepage, whatever that might be: a static
page,
> a list of posts etc.
>
> But then, by this definition, what does front-page.php do?

Not sure -- primarily because that's not the definition of home.php, but
rather front-page.php. home.php is the list of posts, which is either going
to double as the front page, or be a separate listing such as /blog/.

To answer Michael's question, home.php is going to end up with any kind of
drill-down request that WordPress can't otherwise find a template for and
doesn't fit the definition of archive (search, date, author, taxonomy,
etc.). Things like order/sort, offsets/pagination, or a post type that
doesn't have an archive assigned.


More information about the wp-testers mailing list