[wp-hackers] Page Templates vs Category Templates
mikeschinkel at newclarity.net
Thu Dec 2 07:39:21 UTC 2010
On Dec 2, 2010, at 12:06 AM, Haluk Karamete wrote:
> We should be able to group categories as far as layouts as well. For
> exammple, categories a,b,c,d,e,f will use 1 column lay out and cats
> t,u,x,y,z will use 4 column layout. Is that somehow possible? If so
Something like (I've not tested this code, it's just the concept):
<?php // category.php
$term = $wp_query->get_queried_object();
else if (in_array($term->slug,array('t','u','x','y','z')))
I can actually think of at least 5 ways to map the categories to a template file, it is just one of those ways.
Hope this helps.
More information about the wp-hackers