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
}
Related posts:
- esmi on "Different template for first page of category pagination" http://codex.wordpress.org/Template_Tags/query_posts I think if you check your category template file,...
- hookjd on "[Plugin: WordPress Category Archive] Good, but with downsides" This plugin also links to urls that won’t work if...
- HAMMADHASSAN on "Monetize Our WordPress Blog" How can We do to monetize Our wordpress blog. Share...
- azzoozi on "5 Latest Posts??" I was searching for something similar to this .. thanx...
- t31os_ on "Exclude posts from some category" Remove the & like i did in the example further...
Related posts brought to you by Yet Another Related Posts Plugin.






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