I'm trying to show posts from a different category in two separate divs. First time I've used query_posts, but I think I'm not closing it properly or something, because if I setup the first div to show posts only from category 5, and the second to show posts only from category 4, they will both show posts from 5.
What am I doing wrong?
<!--- START FIRST DIV --->
<div>
<?php if (is_home()) {query_posts("cat=5");}?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div>
<article <?php post_class() ?> id="post-<?php the_ID(); ?>">
<div><?php the_post_thumbnail( array(300, 170) ); ?></div>
<div><a href="<?php the_permalink() ?>"><?php the_title(); ?><br />(<?php the_date(); ?>)</a></div>
</article>
</div>
<?php endwhile; ?>
<?php endif; ?>
</div>
<!--- END FIRST DIV -->
<!--- START SECOND DIV --->
<div>
<?php if (is_home()) {query_posts("cat=4");}?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div>
<article <?php post_class() ?> id="post-<?php the_ID(); ?>">
<div><?php the_post_thumbnail( array(300, 170) ); ?></div>
<div><a href="<?php the_permalink() ?>"><?php the_title(); ?><br />(<?php the_date(); ?>)</a></div>
</article>
</div>
<?php endwhile; ?>
<?php endif; ?>
</div>
<!--- END SECOND DIV -->