Php 分类术语循环,显示一个术语的所有帖子,而不仅仅是一个

Php 分类术语循环,显示一个术语的所有帖子,而不仅仅是一个,php,wordpress,taxonomy,posts,Php,Wordpress,Taxonomy,Posts,我有一个问题,我有一个名为categories的分类法,以及其中的术语。在这个分类法的页面上,我想显示这个术语的每一篇文章。但在我做的这个循环中,只有好术语的第一篇文章显示在页面上。所以我不知道为什么我的循环没有显示这个学期的每一篇文章 这是我的密码: <?php $term=get_term_by('slug',get_query_var('term'),get_query_var('taxonomy')); ?> <?php if (

我有一个问题,我有一个名为categories的分类法,以及其中的术语。在这个分类法的页面上,我想显示这个术语的每一篇文章。但在我做的这个循环中,只有好术语的第一篇文章显示在页面上。所以我不知道为什么我的循环没有显示这个学期的每一篇文章

这是我的密码:

<?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(); ?>

谢谢你的帮助。我是wordpress的初学者。

需要帮助吗