Witam
Zakupiłem motyw, który nie wyświetla na stronie głównej podkategorii, podkategorii czyli np. LAW(główna kategoria) -> Journal(podkategoria) -> 2013 and 2014(podkategorie podkategorii, które nie są już wyświetlane). Oto kod odpowiedzialny za kategorię:
Kod
<?php
/*
Template Name: Knowledge Base
*/
?>
<?php
$cat_args = array(
  'orderby' => 'slug',
  'order' => 'ASC',
  'hierarchical' => true,
  'parent' => 0,
  'child_of' => 0
);

$categories = get_categories($cat_args);
$catCounter = 7;
foreach($categories as $category) {
$catCounter++;
    
  if ($catCounter == 1) {
    echo '</div><div class="row knowledge-base">';
  }
  elseif ($catCounter == 8) {
    $catCounter = 1;
    echo '<div class="row knowledge-base">';
  }
  elseif ($catCounter == 3) {
    $catCounter = 0;
  }
        
    echo '<div class="span3">';
    echo '<h2><a href="' . get_category_link( $category->term_id ) . '" title="' . $category->name . '" ' . '>' . $category->name.'</a></h2>';

// Sub category
$sub_category = get_category($category);
$subcat_args = array(
  'orderby' => 'name',
  'order' => 'ASC',
  'child_of' => $sub_category->cat_ID,
  'parent' => $sub_category->cat_ID
);
$sub_categories = get_categories($subcat_args);

foreach($sub_categories as $sub_category) {
    echo '<ul class="sub-categories">';
    echo '<li><i class="icon-folder-close"></i> <a href="' . get_category_link( $sub_category->term_id ) . '" title="' . $sub_category->name . '" ' . '>' . $sub_category->name.'</a></li>';
    echo '</ul>';
}


//List Posts

// Smart Lists
$cat_post_num = gt_get_option('kb_aticles_per_cat');

$sub_category_num = count($sub_categories);
if ($sub_category_num != 0) {
$cat_post_num_smart = $cat_post_num - $sub_category_num;
} else {
$cat_post_num_smart = $cat_post_num;    
}
$posts_order = '';// of_get_option('st_hp_cat_posts_order');


global $post;
// Listed by popular?
if ($posts_order == 'meta_value_num') {
    $cat_post_args = array(
      'numberposts' => $cat_post_num_smart,
      'orderby' => $posts_order,
      'meta_key' => '_st_post_views_count',
      'category__in' => $category->term_id
    );
} else {
    $cat_post_args = array(
      'numberposts' => $cat_post_num_smart,
      'orderby' => $posts_order,
      'category__in' => $category->term_id
    );
}
    
    $cat_posts = get_posts($cat_post_args);
    echo '<ul class="category-posts">';
    foreach($cat_posts as $post) : setup_postdata($post);
  if (get_post_format() == 'video') {
    $post_icon = 'icon-film';
  } elseif (get_post_format() == 'image') {
    $post_icon = 'icon-picture';
  } else {
    $post_icon = 'icon-file';
  }
    ?>
    
    <li><i class="<?php echo $post_icon; ?>"></i> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>

    <?php
    endforeach;
    echo '</ul>';
  echo '<span class="label label-color"><a href="' . get_category_link( $category->term_id ) . '" title="" ' . '>View all ' . $category->count .' articles <i class="icon-chevron-right"></i></a></span>';
    echo '</div>';
}
?>
  </div>

Proszę o pomoc.