更新 2021 / 2 / 19

子タームの名前を表示する(リンク無し)

archive.phpなどにラベルとして表示してもいいと思います。

'○○○'の部分はfunction.phpに記述したタクソノミーを指定してください。


                   <?php if ($terms = get_the_terms($post->ID, '○○○')) { foreach ( $terms as $term ): if($term->parent) echo esc_html($term->name); endforeach;} ?>