显示帖子的自定义分类法底部术语

问题描述

我在下面的代码中使用了 post_cat 但是我想使用的是自定义分类法。它如何工作?谢谢

<?PHP $categories = get_the_category();
     $separator = '.';
     $output = '';
     if ( ! empty( $categories ) ) {
     foreach( $categories as $category ) {
      $children=get_categories(array( 'parent' => $category->cat_ID ));
          if ( count($children) == 0 ) {
            $output .= '<a href="' . esc_url( get_category_link( 
            $category->term_id ) ) . '">' . esc_html ($category->name) . 
           '</a>' . $separator;
         }
    }

         echo trim( $output,$separator );

  } ?>

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)