I am trying to display posts from a certain category on a page, but I'm having a hard time getting query_posts to listen to me. It keeps displaying posts from every category instead of the one I have specified.
I also tried using the LIST CATEGORY POSTS plugin and I get the same result. Posts from every category show up, instead of just the one category I have specified.
Here is the code I am using (when I'm not using the plugin, of course). Any ideas?
<?php
/*
Template Name: Books
*/
?>
<?php get_header(); ?>
<div id="content_box">
<?php include (TEMPLATEPATH . '/l_sidebar.php'); ?>
<div id="content" class="pages">
<h2><?php the_title(); ?></h2>
<div class="entry">
<h3>2009 Winter</h3>
<?php query_posts('cat=55'.'&order=ASC'); ?>
<?php while (have_posts()) : the_post(); ?>
<ul>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a>
</ul>
<?php endwhile;?>
<h3>2009 Spring</h3>
<?php query_posts('cat=7'.'&order=ASC'); ?>
<?php while (have_posts()) : the_post(); ?>
<ul>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a>
</ul>
<?php endwhile;?>
<h3>2009 Summer</h3>
<?php query_posts('cat=7'.'&order=ASC'); ?>
<?php while (have_posts()) : the_post(); ?>
<ul>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a>
</ul>
<?php endwhile;?>
<h3>2009 Fall</h3>
<?php query_posts('cat=9'.'&order=ASC'); ?>
<?php while (have_posts()) : the_post(); ?>
<ul>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a>
</ul>
<?php endwhile;?>
<h3>2010 Winter</h3>
<?php query_posts('cat=59'.'&order=ASC'); ?>
<?php while (have_posts()) : the_post(); ?>
<ul>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a>
</ul>
<?php endwhile;?>
<h3>2010 Spring</h3>
<?php query_posts('cat=56'.'&order=ASC'); ?>
<?php while (have_posts()) : the_post(); ?>
<ul>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a>
</ul>
<?php endwhile;?>
<h3>2010 Summer</h3>
<?php query_posts('cat=57'.'&order=ASC'); ?>
<?php while (have_posts()) : the_post(); ?>
<ul>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a>
</ul>
<?php endwhile;?>
<h3>2010 Fall</h3>
<?php query_posts('cat=58'.'&order=ASC'); ?>
<?php while (have_posts()) : the_post(); ?>
<ul>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a>
</ul>
<?php endwhile;?>
</div>
<div class="clear rule"></div>
<div class="clear"></div>
</div>
<?php include (TEMPLATEPATH . '/r_sidebar.php'); ?>
</div>
<?php get_footer(); ?>