how to limit posts displayed with this codeblock by category
-
Hi, I’ve had a look through the twentyten loop but I can’t figure this out at this hour of the night. What is the best way to filter posts by category with the below codeblock? Thanks.
<h2 class="entryhead"><a href="<?php the_permalink() ?>"><?php the_title(); ?> </a></h2> <div id="news" class="about"> <?php if (have_posts() ) : ?> <?php while (have_posts() ) : the_post(); ?> <article <?php post_class() ?> id="post-<?php the_ID(); ?>"> <div class="entry"> <?php the_excerpt(); ?> </div> <em class="postedon"> Posted on: <?php the_time('F jS, Y') ?></em> <em class="postedby">by <?php the_author() ?></em> <div class="postmetadata"> <?php the_tags('Tags: ', ',', '<br />'); ?> Posted in <?php the_category(', ')?> | <?php comments_popup_link('No Comments ?', ' 1 Comment ?', '% Comments ?'); ?> </article> <?php endwhile; ?> <?php else : ?> <h2>Not Found</h2> <?php endif ; ?> </div><!-- news -->
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘how to limit posts displayed with this codeblock by category’ is closed to new replies.