Title: Order By Category
Last modified: August 19, 2016

---

# Order By Category

 *  [turbolemonjames](https://wordpress.org/support/users/turbolemonjames/)
 * (@turbolemonjames)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/order-by-category/)
 * Hi I’ve created an authors page which consists of the author details, and the
   title’s of the posts they’ve written.
 * The following code organises the posts alphabetically for me
 *     ```
       <?php
       $posts = query_posts($query_string . '&orderby=title&order=asc&posts_per_page=-1');
       if (have_posts()) : while (have_posts()) : the_post(); ?>
       ```
   
 * I was wondering if it’s possible to modify this code so that it displays the 
   post via category and then alphabetically ?
 * The reason being is that each category uses a different coloured link so it looks
   smarter grouping the posts from a each category.
 * Any help welcome, cheers

The topic ‘Order By Category’ is closed to new replies.

 * 0 replies
 * 1 participant
 * Last reply from: [turbolemonjames](https://wordpress.org/support/users/turbolemonjames/)
 * Last activity: [16 years, 1 month ago](https://wordpress.org/support/topic/order-by-category/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
