Return to Snippet

Revision: 29484
at July 30, 2010 06:06 by S_Park


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

Revision: 29483
at July 30, 2010 06:06 by S_Park


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

Initial URL


Initial Description


Initial Title
Wordpress: List sub-categories of current category

Initial Tags
wordpress, category

Initial Language
PHP