Best way to prevent post duplication when using multiple loops
I have the following loops on a page on my website.
Whats the best way to adapt the code below to stop the post in my first loop, being repeated in the second?
?php query_posts('showposts=1post_type=post'); ?
?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?
div id="latestpost" ?php
if ( $thumbnail_id = get_post_thumbnail_id() ) {
if ( $image_src = wp_get_attachment_image_src( $thumbnail_id, 'normal-bg' ) )
printf( ' style="background-image: url(%s);"', $image_src[0] );
}
?
article id="post-?php the_ID(); ?" ?php post_class(); ?
a href="?php the_permalink(); ?" title="?php the_title(); ?"
h2?php the_title() ;?/h2
div class="summary" style="color:#fff;"
?php the_excerpt(); ?
/div
!-- ?php the_post_thumbnail(); ? --
?php endwhile; else: ?
pSorry, there are no posts to display/p
/a!-- permalink --
?php endif; ?
/article
/div!-- latest post --
?php wp_reset_query(); ?
div id="postlist"
h2Personal finances/h2
?php query_posts('showposts=3post_type=postcategory_name=Personal');
?
?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?
!-- article --
article id="post-?php the_ID(); ?" ?php post_class(); ?
!-- post title --
div class="post-thumbnail"
!-- post thumbnail --
?php if ( has_post_thumbnail()) : // Check if thumbnail exists ?
a href="?php the_permalink(); ?" title="?php the_title(); ?"
?php the_post_thumbnail(array(120,120)); // Declare pixel size you need inside the array ?
/a
?php endif; ?
!-- /post thumbnail --
/div
h3 class="postlist-article-header"
a href="?php the_permalink(); ?" title="?php the_title(); ?"?php the_title(); ?/a
/h3
!-- /post title --
/article
!-- /article --
?php endwhile; ?
?php else: ?
!-- article --
article
h2?php _e( 'Sorry, nothing to display.', 'html5blank' ); ?/h2
/article
!-- /article --
?php endif; ?
?php wp_reset_query(); ?
Topic post-duplication Wordpress
Category Web