[Resolved] query posts to display posts from 2 categories
I am trying to get all the posts from 2 categories to display in a sidebar. I’ve got it working fine for 1 category but I wanted to use 2!
<?php query_posts('cat=22,23&showposts=20'); ?><ul> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?>
Is this how I should do it? If I take out the 23 (in bold) then the loop works fine but if I leave it in I just get category 22. No category 23.
Thanks for any pointers.
- The topic ‘[Resolved] query posts to display posts from 2 categories’ is closed to new replies.