How do I stop the same post showing multiple times in a archive?
Question
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: https://portfolioadviserlink.com/topics/esg/
$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;
}
}
?>
0
archives, custom-taxonomy, loop, query-posts, wp-query
3 years
2020-06-05T06:11:12-05:00
2020-06-05T06:11:12-05:00 0 Answers
97 views
0
Leave an answer