Skip to main content
2 of 4
edited title

How to prevent posts duplicating when viewing a custom taxonomy term.

My question is fairly basic. I have an archive.php and inside I have the main loop like so:

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

Do stuff here

<?php endwhile; endif; ?>

Works fine for categories but not for custom taxonomies. I have a custom taxonomy called "Type". I go to the WordPress menu and add the term "Spa Break" from the "Type" taxonomy.

This works, however I get about 10 of each post for every post. All the ID's for the duplicate posts are the same, it just decides to list 10 of each.

I have added no custom queries or anything like that.

Any clues to what might be happening?

Here is my taxonomy:

register_taxonomy("type", array("venue"), array("hierarchical" => true, "label" => "Types", "singular_label" => "Type", "rewrite" => true)); 

Thanks in advance.