[wp-hackers] Page Templates vs Category Templates

Philip M. Hofer (Frumph) philip at frumph.net
Thu Dec 2 11:27:10 UTC 2010


Yeah reading the thread, it's not as difficult as you guys are making it, 
doing the template_part and doing "if (in_category('categoryname')) in the 
layout parts would work just as well"

In the theme's setting pages you can probably also define which categories 
get which layouts too, which would be quite a bit easier then hardcoding.




----- Original Message ----- 
From: "Philip M. Hofer (Frumph)" <philip at frumph.net>
To: <wp-hackers at lists.automattic.com>
Sent: Thursday, December 02, 2010 3:10 AM
Subject: Re: [wp-hackers] Page Templates vs Category Templates


> Ah yeah I do that in comicpress with a drop down selection of which layout 
> the user wants to use.
>
> In the header at the very bottom I put a 
> get_template_part('layout','head'); and first line of the footer 
> get_template_part('layout','foot'); which handles the layout code, and 
> based on the user selection I wrote an if 
> (comicpress_is_layout('standard,vertical')) {  then handle it.  each of 
> the pages only contains the 'content' of those specific pages, while the 
> layout pages handle the sidebars etc how the content is displayed, etc.
>
> Think I have 11 different layouts, most with their own widths and some 
> without certain sidebars etc.
>
> Catching up on reading the whole thread right now.
>
>
>
> ----- Original Message ----- 
> From: "Mike Little" <wordpress at zed1.com>
> To: <wp-hackers at lists.automattic.com>
> Sent: Thursday, December 02, 2010 2:58 AM
> Subject: Re: [wp-hackers] Page Templates vs Category Templates
>
>
>> On 2 December 2010 10:39, Philip M. Hofer (Frumph) 
>> <philip at frumph.net>wrote:
>>
>>> Mike, quick question..
>>>
>>> You want to basically have each category have their own look right?
>>>
>>> You know you can do this with CSS and a body_class() filter right?
>>>
>>> - Phil
>>>
>>>
>> Yes, of course.
>>
>> The topic is essentially about being able to select *theme provided* 
>> layouts
>> on a per category basis (similar to how you do for page templates -- and
>> they could be the same ones) for people who are not up to 
>> creating/modifying
>> themes.
>>
>> Mike
>> -- 
>> Mike Little
>> http://zed1.com/
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
>
>
> _______________________________________________
> 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