Hello.
I want to add a loop to 2 static pages on my site. I am putting in the PHP, and it’s not doing what I want. I want to display all my posts that are categorized under ‘READ’ on one page, the category ‘LISTEN’ will be on another. The Category ID for READ is 3. This is the code I have, why is it not working?
<?php
query_posts( ‘category_name=READ&posts_per_page=10’ );
if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php if ( in_category(‘3’) ) {?>
<h2>” rel=”bookmark” title=”Permanent Link to <?php the_title_attribute(); ?>”><?php the_title(); ?></h2>
<small><?php the_time(‘F jS, Y’) ?> by <?php the_author_posts_link() ?></small>
<div class=”entry”>
<?php the_content(); ?>
</div>
<?php endwhile; else: ?>
<p>No Posts</p>
<?php endif; ?>
I only want posts, there is no static content on these pages. Currently, I am getting all my posts on this page, not just the ones specified. Also in settings, I have left my posts page blank.