[wp-hackers] Page Templates vs Category Templates

Chip Bennett chip at chipbennett.net
Thu Dec 2 03:35:05 UTC 2010


On Wed, Dec 1, 2010 at 9:18 PM, Haluk Karamete <halukkaramete at gmail.com>wrote:

> I see your points. But I still do not get why have "that convenient
> functionality" in one ( that is Add New Page UI ) but not in the other
> ( that is Add New Category UI).
>

The analogous page to "Add Page" is not "Add Category", but rather "Add
Post".

>
> You are saying "The template-file functionality is exactly the same
> for Categories; the difference is only in the UI." I'm asking Why the
> UIs are different...
>

I tried to give one explanation, dealing with the differences between Posts
and Pages. They behave differently because *they are different*.

>
> You may ask who cares...  new comers may. me for sure. I'm sure most
> users go thru this kind of cycle.
>
> step 1:  install WP
> step 2: create a post ( which goes automatically into "uncategorized ")
> step 3: create a category
> step 4: create a few more and then get a sense of how this thing really
> kicks...
> and then soon after discover the wonderful world of themes...  which
> show cases various page layouts..  ( but no category layouts! )
>
> soon you bring a few themes home, & you see, the page layouts, ( the
> SideBar on the left, sidebar on the right stuff ) and you get to
> choose them when you are creating pages, but the cats got no luck! As
> a new comer, you definitely go thru this.
>
> Then you look back into your categories and wonder why on earth this
> functionality why the lack of those various page layouts options DO
> NOT EXIST for categories even though it is EQUALLY & EASILY achievable
> by WP. And interestingly, cats are the 1st group where you need this
> kind of flexibility, I think more than the pages...  Why should not I
> have a no sidebar ( just content layout ) for some of my category
> pages...  but you look at the themes world, majority provide a
> no-sidebar layout only for the pages but cats are totally left alone.
> I think this end-result may be trickling down from the out-of-the-box
> WP UI which exposes Page layoutsbut not the cat layouts.
>

It strikes me that perhaps the question you are really asking is: why do
Theme developers bundle various Page templates, but don't likewise bundle
various Category templates? There are many reasons, but the most prominent
one is probably that a publicly released Theme isn't likely to know in
advance what categories will be used by any given user.

One thing that *might* help will be Post Formats in 3.1. A Theme can use
known Post Format types ("gallery", "aside", etc.), and then add Category
templates using those same Post-Format type names - then instruct the Theme
user to categorize the Post identically to the Post-Format type (e.g., to
remove sidebars from "image" or "gallery" Posts).

>
> I'm sure Jane must have thought about this and decided the way it is
> now. I'm only curious to understand the wisdom behind it.
>
> I amy be wrong, but it just appears to me that if the next version
> were to expose this functionality, it would not only make it
> convenient to the end user to select a category template from the drop
> down but also encourage the theme designers to bundle their themes
> with as many category layouts as the page layouts they provide.


But how would you propose that? It would be totally unintuitive, unless you
tied the Post-index layout template to the *Taxonomy*, rather than to
individual *Posts*. (For example: to "expose" the UI on the Add Post page
would require the user both to define the Category *and* to define the
template. Further, a defined Post template would apply to the single Post
view, but not the index (archive) view.)

I just don't think it's as straight-forward as you're imagining, due to the
inherent differences between Pages and Posts.


More information about the wp-hackers mailing list