Hi! I was hoping that I could display all my posts in category order, i.e., show all posts in cat 1, all in cat 2 etc…. I’m using WordPress 2.5
Is there a way of doing something like this but with no fixed category number?
<?php $my_query = new WP_Query('cat=4'); while ($my_query->have_posts()) : $my_query->the_post(); the_title(); endwhile; ?>'
I’ve tried using
$posts = query_posts('orderby=category'); foreach($posts as $post) : setup_postdata($post); the_title(); endforeach; ?>
but that didn’t work.
- The topic ‘Order posts by category?’ is closed to new replies.