treehouse : what would you like to learn today?
Web Design Web Development iOS Development

[WP] Displaying everything within a category

  • If I tag an article:
    Category -> Sub -> Sub-Sub

    Would it be possible for me to output a display like this:
    Category
    -Sub
    --Sub-Sub

    ---Post 1
    ---Post 2
    -Sub
    --Sub-Sub

    ---Post 1
    ---Post 2
    ---Post 3
    Category
    -Sub
    --Sub-Sub

    ---Post 1
    -Sub
    --Sub-Sub

    ---Post 1
    ---Post 2

    Here is an image of what I mean: http://i25.tinypic.com/6idttz.jpg
  • I mean, you can display anything that you want. Are you meaning displaying it all with one loop?
  • Yeah, that's what I mean :lol: , I should have specified.
    Some kind of foreach thing? I'm not exactly sure how you would achieve that 'effect'. I've managed to display child categories of a Category, but I can't seem to loop the child categories and display it's child categories or posts.