[wp-trac] [WordPress Trac] #21951: Twenty Twelve: add post_type_archive_title to archive.php
WordPress Trac
wp-trac at lists.automattic.com
Wed Sep 26 02:54:50 UTC 2012
#21951: Twenty Twelve: add post_type_archive_title to archive.php
---------------------------+-----------------------
Reporter: thomask | Owner:
Type: enhancement | Status: reopened
Priority: normal | Milestone: 3.5
Component: Bundled Theme | Version:
Severity: normal | Resolution:
Keywords: has-patch |
---------------------------+-----------------------
Changes (by knutsp):
* cc: knut@… (added)
Comment:
I think that the very specific archive template files for
author/date/tag/category/taxonomy should not be used by a theme, unless
they actually must be structurally different and/or would have to use
several similar if blocks to create the desired output in each case. The
theme should just use the more general archive.php with conditionals when
it's just about the header (title and description).
This then also goes for Twenty Twelve. Add some good comments to say that
this archive.php may be split into separate files (name them) instead of
adding more conditional statements for the rest.
The template hierarchy is one of the fundamentals of WordPress, that's
right. But we don't need to be fundamentalists on this. Several files with
95% duplicated code is a bloat. archive.php is also part of the template
hierarchy, it's not a hack, nor a shortcut. It's just common sense in most
cases.
I also support the idea of two (four) new template functions to get the
archive header elements without the need for conditionals. Elegant.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21951#comment:31>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list