Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はこれをグーグルで検索しましたが、答えが見つかりません。
投稿のカスタム分類法を作成しました。
投稿に割り当てられた分類法を単一の投稿ページにリストしたいと思います。たとえば、投稿のタグまたはカテゴリを一覧表示する場合は、次のようにします。
<?php the_tags('Tags: ', ', ', '<br />'); ?> <?php the_category(', ') ?>
1つの投稿ページにカスタム分類をリストするにはどうすればよいですか?
the_terms( get_the_ID(), 'taxonomy_name', 'myTaxonomy: ', ', ', '<br />' );
また
echo get_the_term_list( $post->ID, 'taxonomy_name', 'myTaxonomy: ', ', ', '<br />' );
トリックを行う必要があります。