csbecker
Member
Posted 2 years ago #
I have been able to get a list of posts from 2 categories.
<?php query_posts('cat=33,32&order=ASC&posts_per_page=-1');
But the result shows posts from the first category and then the second category. But I would rather have them combined first and then sorted. Does anyone know what query I would do to get this?
Thanks! Chris
Try adding in an orderby parameter - eg: <?php query_posts('cat=33,32&orderby=date&order=ASC&posts_per_page=-1');
csbecker
Member
Posted 2 years ago #
Thanks Esmi. Orderby did it, but I had to do it with title. My final code is:
<?php query_posts('cat=32,33&orderby=title&order=ASC&posts_per_page=-1');
Thanks again!
Glad you got it sorted. :-)