https://creative.shiseido.com/jp/
こちらのページのworksにおいて、赤色のタクソノミーをクリックした際、遷移先のアーカイブページの
絞り込みで、同じタクソノミーがチェックされている状態にしたいのですがどのように実装すればよろしいか
ご教授いただきたいです。
言葉が分かり図楽申し訳ございません。
下記 index.php
<section class="section section-project"> <h2 class="section-title section-title__project">Project</h2> <div class="project-wrapper"> <ul class="project-list"> <?php global $query_string; query_posts( Array( 'post_type' => array( 'works' ), 'tax_query' => array( array( 'taxonomy' => 'pickup', //タクソノミー名を指定 'field' => 'slug', 'terms' => 'pickup', 'operator' => 'IN' //'AND'、'IN'、'NOT IN'の何れかを指定 ) ), // 'showposts' => 5, 'posts_per_page' => 6, 'paged' => get_query_var('paged') ) ); if (have_posts()) { while (have_posts()) { the_post(); ?> <li class="project-listItem f-right"> <a href="<?php the_permalink(); ?>"> <div class="project-img"> <?php the_post_thumbnail(); ?> </div> <h3><?php the_title(); ?></h3> </a> <div class="project-meta"> <ul class="meta-list"> <?php $terms = get_the_terms($post->ID,'workstag'); foreach( $terms as $term ) { echo '<li><a href="'.get_term_link($term->slug,'workstag').'">'.$term->name.'</a></li>'; } ?> </ul> </div> <a href="<?php the_permalink(); ?>" class="btn btn-project">more</a> </li> <?php } }else{ } wp_reset_query(); ?> </ul> <a href="" class="btn btn-all">All Projects</a> </div> </section>
あなたの回答
tips
プレビュー