article directory
    ~
Advanced Hosters -

vikman
: 16.03.2011
: 3
# : 16, 2011 12:36 pm
. ( ) .
3 "Subcategories:
No categories" ( )
.

, :

:
<?php if (get_categories()) { ?>
      <h3>Subcategories:</h3>
      <ul class="child-categories">
                <?php wp_list_categories('show_count=1&child_of='.$cat.'&hide_empty=0&title_li='); ?>
      </ul>
<?php    } else { ?>
    <?php
      $ID = $wp_query->posts[0]->ID;
      $postcat = get_the_category($ID);
      $cat = $postcat[0]->cat_ID;
      $parent = get_category($cat);
    ?>
<?php if ($parent->parent) { ?>
         <ul class="child-categories">
                <?php error_reporting(0); wp_list_categories ('show_count=1&child_of='.$parent->parent.'&exclude='.$cat.'&hide_empty=0&title_li='); ?>
      </ul>
   
      <?php } else {
    } ?>
<?php    } ?>




http://img16.imageshack.us/i/20110315185723.png/

: "The number of child categories to show: 99"
.

vikman
: 16.03.2011
: 3
# : 16, 2011 8:44 pm
?

vikman
: 16.03.2011
: 3
# : 18, 2011 4:34 pm
    ~