HI every one
I want to make a category list , something like this :
Projects(Main Category)
- Music (sub-category)
- Video (sub-category)
- Audio (sub-category)
Sponsors(Main Category)
- Music (sub-category)
- Video (sub-category)
- Audio (sub-category)
I've searched alot and I found this code :
<?php
$parentCatName = single_cat_title('',false);
$parentCatID = get_cat_ID($parentCatName);
$childCats = get_categories( 'child_of='.$parentCatID );
if(is_array($childCats)):
foreach($childCats as $child){ ?>
<h2><?php echo $child->name; ?></h2>
<?php query_posts('cat='.$child->term_id);
while(have_posts()): the_post(); $do_not_duplicate = $post->ID; ?>
<?php
endwhile;
wp_reset_query();
}
endif;
?>
I've 2 problems with this.
1- the catagories and sub-categories are not linkable .They're just text .
2-I want to make a space for sub-categories.
Please help me to solve these problems ,
I need it very very very much
thanks