PHP Wordpress:列出当前类别的子类别

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了PHP Wordpress:列出当前类别的子类别相关的知识,希望对你有一定的参考价值。

<?php if (is_category()) {
  $current_cat = get_category($cat);
  if (get_category_children($current_cat->cat_ID) != "") {
    echo "<ul>";
    wp_list_categories('orderby=id&show_count=0&title_li=&use_desc_for_title=1&child_of='.$current_cat->cat_ID);
    echo "</ul>";
  }
} ?>

以上是关于PHP Wordpress:列出当前类别的子类别的主要内容,如果未能解决你的问题,请参考以下文章