wp_query outputting my posts twice
-
hello
I’m customizing the taxonomy.php template to have the posts displayed in alphabetical order. it’s working but I can’t figure why the posts are outputted twice… even if I use reset_post_data…
here is my code :<?php $query = new WP_Query(array( 'post_type' => 'reference', 'taxonomy'=>'marque', 'term'=>$term->slug, 'orderby' => 'title', 'order' => 'ASC' )); if($query->have_posts()) : while($query->have_posts()) : $query->the_post(); ?> <div class="vignette-cata"> <figure> <a href="<?php the_permalink() ?>"><?php the_post_thumbnail('full'); ?></a> <figcaption><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></figcaption> </figure> </div> <?php endwhile; endif; wp_reset_postdata(); ?>
have I done something wrong ?…
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘wp_query outputting my posts twice’ is closed to new replies.