Support » How-To and Troubleshooting » Avoid duplicated posts

Avoid duplicated posts

  • Hi,

    I followed this instructions and I could avoid the duplicate posts, but the matter is that I only display 3 posts on the differents colums… You’ll see “Secundaria” in blank.

    How can I put posts_per_page=3 to show the last 3 post, but not duplicated, the previous ones, do you understand?

    I hope you can help me.

    Link: http://bit.ly/VAlj66

    A fragment of my code:

    				<?php query_posts('cat=1,-3,-4,-102,-100,-111&order=DESC&posts_per_page=3'); if ( have_posts() ) : while ( have_posts() ) : the_post();  if (!in_array($post->ID, $ids)) { ?>
    				<li id="gradeNews-<?php the_ID(); ?>">
    					<div class="postImage">
    						<a href="<?php the_permalink(); ?>"><?php echo get_post_image('thumbnail','','default-thumb'); ?></a>
    					<div class="postInfo">
    						<div class="postTitle">
    							<h4><a href="<?php the_permalink(); ?>" title="Link permanente a <?php the_title_attribute(); ?>"><?php short_title('','…',true, '35'); ?></a></h4>
    							<p class="postMeta"><?php the_time('j F, Y'); ?></p>
    				<?php } endwhile; else: ?>
    				<li><em>No hay noticias en Secundaria!</em></li>
    				<?php endif; ?>
    				<?php wp_reset_query();?>

    Thanks you!

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Avoid duplicated posts’ is closed to new replies.
Skip to toolbar