Displaying only entries from ONE category. in a double loop
-
its a double loop on my site, i have 3 columns. in the middle, i want everything BUT category 5. In the left side, i want ONLY category 5.
the heirearchy is leftside, then main…
on the leftside i have:
<?php $my_query = new WP_Query(‘category_id=5’);
while ($my_query->have_posts()) : $my_query->the_post();
?>
<h2>“><?php the_title(); ?></h2>
<small><?php the_time(‘F jS, Y’); ?></small>
<?php endwhile; ?>which i know isnt completely proper, but it works for displaying everything, but how do i throw in a “display only cat 5” tag…
and then in the middle, i am assuming i throw in a
if (in_category(‘5’): continue;)
correct?if i have to post the site i will, but as its not near completion, i dont want to yet.
- The topic ‘Displaying only entries from ONE category. in a double loop’ is closed to new replies.