admin管理员组

文章数量:1334666

For some reason the archives for my custom taxonomy is showing each post 3 times and I can't seem to figure out why.

Here is the page: /

        $custom_terms =  get_terms('topics');

        foreach($custom_terms as $custom_term) {
            wp_reset_query();
            $args = array ('post_type' => 'webinar',
                'tax_query' => array(
                    array(
                        'taxonomy' => 'topics',
                        'field' => 'slug',
                        'terms' => $tax->slug,
                    ),
                ),
            );

            $loop = new WP_Query($args);
            if($loop->have_posts()) { 
                while($loop->have_posts()) : $loop->the_post();
            ?>

            content

            <?php
                    endwhile;
                }
            } 
            ?>

本文标签: wp queryHow do I stop the same post showing multiple times in a archive