I am using a automatic rss post reader on my website and there is a problem with this plugin that sometimes publish duplicate posts.I can't do anything to this plugin but at least it is better if I could prevent to display the same titles on main page. here is my code
<ul>
<?php
$portfolio = new WP_Query(array(
'post_status' =>'publish',
'post_type' =>'post',
'cat' =>''.$link1.'',
'posts_per_page' =>'9'
));
if($portfolio->have_posts()) :
while($portfolio->have_posts()) : $portfolio->the_post();
?>
<li>
<a href="<?php the_permalink() ?>" target="_blank"><?php the_title(); ?></a>
</li>
<?php endwhile; endif; wp_reset_query(); ?>
</ul>