IDから属するターム情報を取得

<?php $terms = get_the_terms( $post->ID, 'タクソノミー名' ); // 複数のタクソノミー情報を取得したい場合 $terms = get_the_terms( $post->ID, array( 'タクソノミー名1', 'タクソノミー名2' ) ); ?>
-
前の記事
IDからカスタム投稿タイプの内容を取得する 2016.10.19
-
次の記事
WordPressでサーバ移行時にデータベース上のドメインを書き換える方法 2016.10.19