I have a problem, I have a taxonomy named categories, and terms in it. On the page of this taxonomy, I would like to display each post of the term. But with this loop that I made, only the first post of the good term is displaying on the page. So I don’t know why my loop doesn’t display every posts of the term.
Here is my code :
<?php $term=get_term_by('slug',get_query_var('term'),get_query_var('taxonomy')); ?>
<?php if (have_posts()): while(have_posts()): the_post(); ?>
<div class="article-menu a-m-sp">
<a href="<?php the_permalink(); ?>">
<span class="rollover r2"> </span>
<?php the_post_thumbnail(array(226,150)); ?>
</a>
<div class="right p-special">
<h2 class="h2-article-menu h2-ma"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<p class="date"><?php pll_e('Publié le ') ?> <?php the_time('j F Y'); ?></p>
<?php the_excerpt(); ?>
<a href="<?php the_permalink(); ?>" class="sl8"><?php pll_e('Lire la suite') ?></a>
</div>
</div>
<?php endwhile; ?>
<?php endif; ?>
</article>
<?php get_footer(); ?>
Thank you for your help. I’m a wordpress beginner.