Posted By

S_Park on 07/30/10


Tagged

wordpress category


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

osirisinternet
maxvee8


Wordpress: List sub-categories of current category


 / Published in: PHP
 

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

Report this snippet  

You need to login to post a comment.