• Hi,
    Please look at the homepage of my site: https://www.eeuwigweekend.nl.
    These are the recent posts. As you can see it has two ‘big’ pictures and below six smaller ones.
    Now the problem is that the first big one is being copied below as a small one right below!

    How can I change that? I think the problem lies here, in the home.php file:

    <?php $my_query = new WP_Query('showposts=2');
      while ($my_query->have_posts()) : $my_query->the_post();
      $do_not_duplicate = $post->ID; ?>
    
    <div class="featured <?php sandbox_post_class() ?>" >
    <?php include (TEMPLATEPATH . '/post-image.php'); ?>
    <div class="bigdate"><?php the_time('d M'); ?></div>
    <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>" class="post-content"><?php the_title() ?>
    <span class="post-content-excerpt"><?php the_excerpt(); ?></span>
    <h3 class="page-title author"><?php printf(__('Door: <span class="vcard">%s</span>', 'sandbox'), "$authordata->display_name") ?></h3></a>
    </div><!-- .featured -->
    <?php endwhile; ?>
    
    <div class="recent">
    <?php query_posts('showposts=9'); ?>
    <?php while (have_posts()) : the_post();
      if( $post->ID == $do_not_duplicate ) continue; update_post_caches($posts); ?>
    <div id="post-<?php the_ID() ?>" class="<?php sandbox_post_class() ?>">
    
    <?php include (TEMPLATEPATH . '/post-image.php'); ?>
    
    <div class="bigdate"><?php the_time('d M'); ?></div>
    <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>" class="post-content"><?php the_title() ?>
    <span class="post-content-excerpt"><?php the_excerpt(); ?></span>
    <h3 class="page-title author"><?php printf(__('Door: <span class="vcard">%s</span>', 'sandbox'), "$authordata->display_name") ?></h3></a>
    </div><!-- .post -->
    <?php endwhile ?>
    </div><!-- .recent -->
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Homepage show two of the same posts!’ is closed to new replies.