I know this topic has been addressed elsewhere on the forums, but I can't seem to get it to work. I'm new to php so the syntax is tricky to me. Basically I have a category page where posts overlap categories, and I want to list them in order of importance. That works fine, the problem is I get duplicating posts. Here's my code:
<?php query_posts('category_name=featured');
if ( have_posts() ) : while ( have_posts() ) : the_post();
$do_not_duplicate = $post->ID;
$custom_field_date = get_post_meta($post->ID, 'project-date', true);?>
<!--do stuff-->
<?php endwhile;
wp_reset_query();
?>
<?php query_posts('category_name=winners');
while ( have_posts() ) : the_post();
$do_not_duplicate = $post->ID;
$custom_field_date = get_post_meta($post->ID, 'project-date', true);?>
<!--do stuff-->
<?php endwhile;
wp_reset_query();
?>
<?php query_posts('category_name=portfolio&showposts=50');
while ( have_posts() ) : the_post();
$do_not_duplicate = $post->ID;
$custom_field_date = get_post_meta($post->ID, 'project-date', true);?>
<!--do stuff-->
<?php endwhile; else: ?>
<p>Sorry, no posts matched your criteria.</p>
<?php endif; ?>
What am I missing? Thanks --