WordPress.org

Ready to get started?Download WordPress

Forums

Sidebar display Category with Parent and Child - help (2 posts)

  1. allshookup
    Member
    Posted 5 years ago #

    I'm not sure how to do this and I have spent two days trying to figure it out.
    What I'm trying to do is, list a single category in the sidebar and have it display the children indented below.

    *Parent Category
    **Child Category
    ***Child2
    **Child Category
    ***Child2

    I have been able to display the parents but not the child...
    Here is the code I have so far... I'm sure it is all jacked-up and missing a lot because I don't know much about php...

    <ul>
    <?php wp_list_categories('hide_empty=0&hierarchical=1&title_li=&exclude=4,1,5,'); ?>
    <?php while (have_posts()) : the_post(); ?>
    <?php endwhile; ?>
    </ul>

    Any help you can provide is much appreciated. :)

  2. allshookup
    Member
    Posted 5 years ago #

    I would even mind if it only displays the,
    *Child
    **Child2
    *Child
    **Child2

    some has to know how to do this...

Topic Closed

This topic has been closed to new replies.

About this Topic