• Resolved kiddomono

    (@kiddomono)


    Is there a function that is the opposite of get_category_parents()? Instead of getting the parents of a category, I would like a list of the children in a specific category. Is it possible?

Viewing 1 replies (of 1 total)
  • Thread Starter kiddomono

    (@kiddomono)

    Silly me of course there is. Use this:
    <?php $cat = get_the_category(); $cat = $cat[0]; $catid = $cat->cat_ID; ?>
    <?php wp_list_cats(‘child_of=’.$catid);

Viewing 1 replies (of 1 total)
  • The topic ‘Get children of parent category’ is closed to new replies.