Title: how to sort posts by &#8230;..
Last modified: August 19, 2016

---

# how to sort posts by …..

 *  [b-cobra](https://wordpress.org/support/users/b-cobra/)
 * (@b-cobra)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/how-to-sort-posts-by/)
 * hi
    please , how can i add this to my blog sort posts by : oldest – newest thank
   you

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/how-to-sort-posts-by/#post-1366030)
 * To resort the order of posts, using the WordPress Default theme for example, 
   in the wp-content/themes/default/index.php file, just before the line:
    `<?php
   if (have_posts()) : ?>`
 * put this:
 *     ```
       <?php query_posts($query_string . '&orderby=date&order=ASC'); ?>
       ```
   
 * The [query_posts() article](http://codex.wordpress.org/Template_Tags/query_posts)
   explains the arguments in detail.
 *  Thread Starter [b-cobra](https://wordpress.org/support/users/b-cobra/)
 * (@b-cobra)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/how-to-sort-posts-by/#post-1366034)
 * thank you MichaelH; but how can i make the visitor chosing
 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/how-to-sort-posts-by/#post-1366042)
 * [http://wordpress.org/extend/plugins/wp-smart-sort/](http://wordpress.org/extend/plugins/wp-smart-sort/)

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘how to sort posts by …..’ is closed to new replies.

 * 3 replies
 * 2 participants
 * Last reply from: [MichaelH](https://wordpress.org/support/users/michaelh/)
 * Last activity: [16 years, 3 months ago](https://wordpress.org/support/topic/how-to-sort-posts-by/#post-1366042)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
