getting posts from two categories
-
Hi
I have a small blog. I want to show posts from categories that have the numbers 10 and 15 – and order them by date
I have tried this:
<?php if (is_home()) { query_posts( array ( 'category_and' => array(10,15), 'posts_per_page' => 20, 'orderby'=>'date', 'order'=>'DESC' ) ); } ?>
but it doesn’t work – it gives me 20 posts, but not restriced to the two categories
Please can someone help.
- The topic ‘getting posts from two categories’ is closed to new replies.