Support » Fixing WordPress » Display children categories only for a particular category

  • Round 2, hopefully rephrasing the question will bring an answer. I really need to do this, and am not getting anywhere 🙁

    I want to list all children items for a category, when on category.php, *outside* the loop.

    So, if I have
    parent: clowns
    child: patof
    parent: cars

    When the user clicks on a link to “Clowns” , it will bring category.php, showing the “clowns” category. Then above the loop, I want to have a list that includes “bozo” and “patof”.

    If someone goes to “cars”, it displays nothing.

    Now, I *could* do this the long way, and create various categoryx.php for each category on the site, and then manually insert a list of children categories. While this might work, it is a LOT of work, and not very flexible, particularly if I’m doing the site for someone else that isn’t savvy enough to create new categoryx.php each time they add categories.

    I’ve scoured the Codex and haven’t found a solution that works.

    Help, anyone?

Viewing 2 replies - 1 through 2 (of 2 total)
  • thanks for that maerk, I hadn’t brought it up when searching.

    It helps, but not entirely. I think it’s splendid to achieve part of my intent, that is, decide whether it’ll show a list or not depending on is it a parent or a child.

    What I can’t wrap my head around is to list the children for a particular category only, in a ul, outside the loop.

    I’ve looked at wp_list_cat, list_cat, but it doesn’t seem to do what I want.

    And I’ll readily admit that I can follow php if it’s in front of me, but writing it, it’s a different logic entirely 🙁 I know what I want it to do, woudln’t know how to code it though.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Display children categories only for a particular category’ is closed to new replies.