Title: Post Order
Last modified: August 20, 2016

---

# Post Order

 *  [BennoH](https://wordpress.org/support/users/bennoh/)
 * (@bennoh)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/post-order-11/)
 * Hello. I would like to change the order of the posts on my homepage. I have had
   a look at the advice on the following link;
 * [http://codex.wordpress.org/Function_Reference/query_posts](http://codex.wordpress.org/Function_Reference/query_posts)
 * Being a total novice, I do not understand this and it may aswell be martian! 
   Could somebody please talk me through how to change the order of the posts on
   my homepage. Many thanks.

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

 *  [David Gard](https://wordpress.org/support/users/duck_boy/)
 * (@duck_boy)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/post-order-11/#post-2413497)
 *     ```
       $args = array(
           'orderby' => 'name', // Can be 'id', 'name', 'date', etc...
           'order' => ASC // Can be ASC or DESC
       );
       query_posts($args);
       ```
   
 * If you are already parsing $args to `query_posts()` then ensure that you add 
   the above options to those $args, as opposed to redeclaring $args and overwriting
   them.
 *  Thread Starter [BennoH](https://wordpress.org/support/users/bennoh/)
 * (@bennoh)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/post-order-11/#post-2413500)
 * Thanks for the help duck_boy, unfortunately I do not understand this. I am a 
   total novice and know next to nothing about code. Could you please elaborate 
   in layman’s terms?
 *  [David Gard](https://wordpress.org/support/users/duck_boy/)
 * (@duck_boy)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/post-order-11/#post-2413503)
 * From your root folder navigate to ‘/wp-content/themes/{whatever theme}/’ and 
   find a file called ‘index.php’. This is where WP gets the posts that it displays.
 * Do a search and look for ‘query_posts’ – if you do not find it, copy the code
   above and place it just before The Loop, which will be identifed by one of the
   following –
 * `if(have_posts) : while(have_posts) : the_post() ....`
    `template_part('loop','
   index');`
 * Make sure you use a proper eidtor (I use Total Edit), not MS Word, as that will
   mess the file up. and make sure that the code is inside PHP tags (`<?php {Your
   code} ?>`).
 *  Thread Starter [BennoH](https://wordpress.org/support/users/bennoh/)
 * (@bennoh)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/post-order-11/#post-2413505)
 * Brilliant. That is exactly what I was after… Many thanks!
 *  [David Gard](https://wordpress.org/support/users/duck_boy/)
 * (@duck_boy)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/post-order-11/#post-2413506)
 * No probelem, hope it helps.

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

The topic ‘Post Order’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 2 participants
 * Last reply from: [David Gard](https://wordpress.org/support/users/duck_boy/)
 * Last activity: [14 years, 5 months ago](https://wordpress.org/support/topic/post-order-11/#post-2413506)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
