I have a custom post type created called 'classes'. Within there i have a taxonomy set up as a category, so because of this there can be multiple occurrences of classes. Example:
Where there is the 2 occurrences of 'Class 1' for example, they are 2 separate posts, just with the same post name.
I then want to output the classes on their page, but not show duplicates of the post name.
The duplicate posts obviously have different slugs (for example: myurl.com/class-1 and then myurl.com/class-1-1), but i want to be able to only show one occurences of a post if the post name is the same.
Below is the simple query i have so far, but not sure how to not show duplicates.
<?php $temp = $wp_query; $wp_query= null; $wp_query = new WP_Query(); $wp_query->query("post_type=classes".'&paged='.$paged); ?> <?php while ($wp_query->have_posts()) : $wp_query->the_post(); ?>