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
版权声明:本文标题:wp query - How do I stop the same post showing multiple times in a archive? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742373135a2462628.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论