Forums

need help to make a catagory list (4 posts)

  1. hno2005
    Member
    Posted 9 months ago #

    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

  2. hno2005
    Member
    Posted 9 months ago #

    could anyone help me please , it's urgent

    [please don't bump - this forum is run by volunteers, and it is the weekend]

  3. hno2005
    Member
    Posted 9 months ago #

    please help

  4. govpatel
    Member
    Posted 9 months ago #

    All you need to do is log in admin and click category in menu and add them from there

Reply

You must log in to post.

About this Topic