Support » Themes and Templates » how to display the sub_categories

  • Resolved holylone

    (@holylone)


    hello!

    i want to add the sub category list in each category

    here is my code

    <?php wp_list_cats(‘hide_empty=0&child_of=XXX’); ?>

    i get the category from the_category_ID()

    and how can i put the ID vaule into child_of

    or have to use the if else to rolve this problem?

    thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • <?php wp_list_categories('child_of='.$_GET[cat].'); ?>

    This works if your permalink structure is set to “default”. IT takes the category number from the web address.

    Hope this helps.

    thanks to deanes02

    i have resloved this problem under your help

    but what is the difference between wp_list_categories() and wp_list_cats()?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘how to display the sub_categories’ is closed to new replies.