Title: post order
Last modified: August 30, 2016

---

# post order

 *  [aisha70](https://wordpress.org/support/users/aisha70/)
 * (@aisha70)
 * [11 years ago](https://wordpress.org/support/topic/post-order-24/)
 * After looking everywhere for the answer to this, I’m hoping someone here can 
   help out.
 * All my categories have posts that show by title. This is the code:
 * > <?php if (is_category()) { $posts = query_posts($query_string . ‘&orderby=title&
   > order=asc’); } ?>
   >  <?php if (have_posts()) : while (have_posts()) : the_post();
 * But now I have one category where I want the posts to show newest to oldest. 
   If the category name is ‘Articles And Essays’ (ID is 42), how can I put some 
   code in there so WordPress shows posts in this one category differently to the
   rest?
 * Thanks,
    Aisha

Viewing 1 replies (of 1 total)

 *  [kjodle](https://wordpress.org/support/users/kjodle/)
 * (@kjodle)
 * [11 years ago](https://wordpress.org/support/topic/post-order-24/#post-6245190)
 * Not tested, but off the top of my head, this should work:
 * `<?php if (is_category(42)) { $posts = query_posts($query_string . '&orderby=
   date&order=asc'); } ?>`

Viewing 1 replies (of 1 total)

The topic ‘post order’ is closed to new replies.

## Tags

 * [post order](https://wordpress.org/support/topic-tag/post-order/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [kjodle](https://wordpress.org/support/users/kjodle/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/post-order-24/#post-6245190)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
