Vintage Theme

January 29th, 2009

vintage

Download

[ Download ]

Blue Theme

January 29th, 2009

blues

Download

[ Download ]

Crafty Card Theme

January 28th, 2009

crafty-cart-thumb

Download

[ Download ]

WP Remix Theme (single user)

January 19th, 2009

wpremix

Download

[ Download ] Template guide & Magazine  Module

[ Download ] Theme

[ Download ] Theme Documentation Guide

[ Download ] Addon Contact Plugin

Coldstone Premium Theme

January 19th, 2009

coldstone

Download

[ Download ]

Quadro Premium Theme

January 19th, 2009

quadro

Download

[ Download ]

Display Sub Categories for Each Category

January 14th, 2009

whack

The code that I will explain here will display sub categories only when you are viewing a single category which contains sub categories. This template hack is very simple.

Place this code in your category.php file

<?php
if (is_category()) {
$this_category = get_category($cat);
if (get_category_children($this_category->cat_ID) != "") {
echo '<h2>';
single_cat_title();
echo '</h2>';
echo '<ul>';
wp_list_categories('orderby=id&hide_empty=1&show_count=0&title_li=&child_of='.$this_category->cat_ID);
echo '</ul>';
}
}
?>

Put this snippet in your category.php template file and It should show sub categories for your parent categories on category pages.

This code simply does the following:

  • Checks whether the current page is a category
  • Checks if the category is parent and has sub categories
  • If it has sub categories, it displays them with a header and unordered list

Customize the wp_list_categories() function

wp_list_categories('orderby=id&hide_empty=1&show_count=0&title_li=&child_of='.$this_category->cat_ID);

By default it displays categories by ID, hides empty categories, and does not show number of posts within each category.

The following code will show post count besides each category

wp_list_categories('orderby=id&hide_empty=1&show_count=1&title_li=&child_of='.$this_category->cat_ID);

Very easy! You can also change hide_empty=1 to hide_empty=0 to display
empty categories (even if they do not have posts, they appear!)

Source from [ http://mywordpressdesign.com/ ]

Google Gmail Theme

January 14th, 2009

gmail

Download

[ Download ]

Small Magazine Theme

January 14th, 2009

sm

Download

[ Download ]

WP theme Directory Theme

January 13th, 2009

wpthemesdirectory

Download

[ Download ]