Treehouse: Grow your CSS skills. Land your dream job.

wordpress subcategories

  • # April 11, 2012 at 10:29 am

    im working on making a wordpress site.
    I plan on having like 4 categories.

    I wanted that when you click a category, the sidebar would show tags for that category, but tags are for all categories so I decided to use subcategories.

    but i can’t seem to find a way to show subcategories only. And how can I list categories without subcategories inside?

    # April 11, 2012 at 1:09 pm

    You could use this:

      < ?php wp_list_categories('orderby=id&show_count=1&use_desc_for_title=0&child_of=8'); ?>

    But you’ll need to find the ID of the category, in this case it’s “8”.

    To find the ID of the category you could use something like this:

    # April 12, 2012 at 9:34 am

    thanks i’ll look into it

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.