Need a hint for WordPress

Discussion in 'WordPress' started by ludwig, Aug 15, 2009.

  1. #1
    Hi guys

    I need to list subcategories and their descriptions when you are in a category in WP (and style it)

    Here is what I need

    <div class='post'>
       <h2><a href="[B]LINK TO SUBCATEGORY[/B]" rel="bookmark" title="Permanent Link to [B]SUBCATEGORY TITLE[/B]">[B]SUBCATEGORY TITLE[/B]</a></h2>
       [B]SUBCATEGORY DESCRIPTION
    [/B]  </div>
    
    Code (markup):
    I got figured this out :

    <?php
    if (is_category()) {
    global $wp_query;
    $cat_obj = $wp_query->get_queried_object();
    //echo $cat_obj->term_id;
    }
    
    
    //$category_id = get_cat_id(single_cat_title());
    //echo single_cat_id();
    $variable = wp_list_categories('style=none&echo=0&depth=1&show_count=0&child_of='.$cat_obj->term_id.'&hide_empty=0');
    echo $variable;
    
    ?>
    Code (markup):
    but couldnt get any further. Can someone help me out here please
     
    Last edited: Aug 15, 2009
    ludwig, Aug 15, 2009 IP