taxonomy.php
<div class="product_wrap">
<ul class="product_vip_ul">
<?php
$type = get_query_var( '〇〇_taxonomy' ); //指定したいタクソノミーを指定
$args = array(
'post_type' => array('〇〇'), /* 投稿タイプを指定 */
'tax_query' => array(
'relation' => 'OR',
array(
'taxonomy' => '〇〇_taxonomy', /* 指定したい投稿タイプが持つタクソノミーを指定 */
'field' => 'slug',
'terms' => $type, /* 上記で指定した変数を指定 */
),
),
'paged' => $paged,
'posts_per_page' => '12' /* 12件を取得 */
); ?>
<?php query_posts( $args ); ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); /* ループ開始 */ ?>
<li>
<a href="<?php the_permalink(); ?>">
<?php the_post_thumbnail('index_thumbnail'); ?>
<div class="<?php $terms = wp_get_object_terms($post->ID,'vip_taxonomy');foreach($terms as $term){echo '' . $term->slug . '-cat';}?>">
<?php if ($terms = get_the_terms($post->ID, 'vip_taxonomy')) {foreach ( $terms as $term ) {echo $term->name;}}?>
</div>
<p class="product_name en"><?php the_title(); ?></p>
</a>
</li>
<?php endwhile; else: ?>
<?php endif; ?>
</ul>
</div>