Ready to get started?Download WordPress


How to suffix the cat description to list child cats (1 post)

  1. Pete
    Posted 10 months ago #

    I have this piece of code I have in my archive.php that lists the child cats of the current parent cat... But now i'd like the cat descriptions suffixed on to the ends of the child cat list.

    Thanks heaps, Pete

        // check if the page is viewed is a category page.
    if (is_category())
    $cur_cat = get_query_var('cat');
        if ($cur_cat)
            $new_cats = wp_list_categories('echo=false&child_of=' . $cur_cat . '&depth=1&title_li=&&show_count=1&hide_empty=0');
            echo '<ul>' . $new_cats . '</ul>';


You must log in to post.

About this Topic