• Resolved joenewbreed

    (@joenewbreed)


    I’ve searched all over the place and I find a lot of people asking questions SIMILAR but not the SAME as mine… I’ve tried a million different things, so I’ll have to ask:

    My categories look like this:

    A
    -1
    -2
    -3
    B
    -1
    -2
    -3
    C
    -1
    -2
    -3
    etc…

    What I want is to apply a different CSS style to each parent/child list. So, I guess what I want is to list the Children of just ONE Parent category, so that I can apply one style to that, and then repeat for each other parent category.

    of course, if anyone knows a better way to do what im talking about, let me know.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter joenewbreed

    (@joenewbreed)

    Nevermind… It seems every time I post a question on here, I answer it myself:

    <?php echo wp_list_cats(‘child_of=’.$cat);?>

    Thread Starter joenewbreed

    (@joenewbreed)

    Actually, a better way is:

    ‘<?php echo wp_list_categories(‘child_of=XXX’); ?>’
    where XXX is the catID of the parent you need the children of

    -OR-

    ‘<?php echo wp_list_categories(‘exclude=XXX’); ?>’
    where XXX is equal to the OTHER parent categories. This will output a list of the parent AND the children.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘List Children of ONE Parent’ is closed to new replies.