Support » Themes and Templates » Only Viewing Child Categories

  • Hey everyone, newbie here. I’m modifying a template, and it has the following code.

    {list_cats optionall=’1′ all=’All’ sort_column=’name’}

    How can I get it so that it displays only the child categories of a particular index number? I’ve been searching, but all the results I find don’t match up to this syntax.

Viewing 1 replies (of 1 total)
  • if the particul post is under the parent AND child category:
    <?php wp_list_cats(‘children=1&child_of=X’); ?>
    X = the category ID of the parent that has the child categories you want to display

    or

    if the particular post is only posted under the child category
    <?php wp_list_cats(‘hide_empty=0&children=1&child_of=2’); ?>

    of course you can add other options to that.. you can look it up in the WP codex

Viewing 1 replies (of 1 total)
  • The topic ‘Only Viewing Child Categories’ is closed to new replies.