Support » Themes and Templates » List of Subcategories & Category descriptions

  • I’m attempting to create a fiction archive and I want to make sure that the site displays exactly as I intended so I’m dividing the stories in genres and then subdividing by story title, so my category structure looks a bit like this:

    Series >> Title of Series >> Post

    What I’d like to do is to have a category page for the parent categories that just displays the subcategories within the category and then the category descriptions for them. I was able to get the first part to work using the code here:

    [code]
    <?php if (is_category()) {
    $this_category = get_category($cat);
    if (get_category_children($this_category->cat_ID) != “”) {
    echo “<h1>Stories</h1>”;
    wp_list_categories(‘orderby=name&show_count=0&title_li=
    &child_of=’.$this_category->cat_ID);
    }
    } ?>[/code]

    but I can’t figure out where exactly to put the category description for it to show up as I want it to. I googled and I searched the forums but I can’t find anything specific.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You have a “code” button above the text input area. Use it, that’s why it is there (don’t reinvent the wheel).

    I apologize — in most of other forums I use (in fact, I have to say all of them) markup is almost always [code] or [b] so I’m just to just typing away. I attempted to edit it but it wouldn’t let me.

    <?php if (is_category()) {
    $this_category = get_category($cat);
    if (get_category_children($this_category->cat_ID) != "") {
    echo "<h1>Stories</h1>";
    wp_list_categories('orderby=name&show_count=0&title_li=
    &child_of='.$this_category->cat_ID);
    }
    } ?>

    Have you sort it out? I am also interested in this.

    Please if you can help.

    Thank you !

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘List of Subcategories & Category descriptions’ is closed to new replies.