HAMMADHASSAN on "New Category Templates in WordPress 2.9"
February 14, 2010 by David Olsen
Until now you had to use a query in your theme or a Plugin to adjust the design or the content according to a specific category. In version 2.9 the template hierarchy gets expanded and you can create with the help of a slug an own template.
Here is an example: some posts with short news – a microblog. Therefore I create a category with this name and use the generated slug.
The presentation of these posts in the category overview should be different. Previously it was necessary to integrate the following query:
if ( is_category(‘microblog’) ) {
// here the output or integration of the stylesheet for category Microblog
}





Comments
Facebook comments:
Feel free to leave a comment...
and oh, if you want a pic to show with your comment, go get a gravatar!