Title: Posts ordering
Last modified: April 14, 2020

---

# Posts ordering

 *  Resolved [mostone](https://wordpress.org/support/users/mostone/)
 * (@mostone)
 * [5 years, 12 months ago](https://wordpress.org/support/topic/posts-ordering/)
 * Which ordering modes available for the posts on page ?

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

 *  Thread Starter [mostone](https://wordpress.org/support/users/mostone/)
 * (@mostone)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/posts-ordering/#post-12986498)
 * any reply?
 *  Plugin Author [Bill Erickson](https://wordpress.org/support/users/billerickson/)
 * (@billerickson)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/posts-ordering/#post-12992724)
 * Here’s a list of all the `orderby` options ([pulled from here](https://developer.wordpress.org/reference/classes/wp_query/#order-orderby-parameters)):
 * ‘none‘ – No order (available since version 2.8).
    ‘ID‘ – Order by post id. Note
   the capitalization. ‘author‘ – Order by author. ‘title‘ – Order by title. ‘name‘–
   Order by post name (post slug). ‘type‘ – Order by post type (available since 
   version 4.0). ‘date‘ – Order by date. ‘modified‘ – Order by last modified date.‘
   parent‘ – Order by post/page parent id. ‘rand‘ – Random order. ‘comment_count‘–
   Order by number of comments (available since version 2.9). ‘relevance‘ – Order
   by search terms in the following order: First, whether the entire sentence is
   matched. Second, if all the search terms are within the titles. Third, if any
   of the search terms appear in the titles. And, fourth, if the full sentence appears
   in the contents. ‘menu_order‘ – Order by Page Order. Used most often for pages(
   Order field in the Edit Page Attributes box) and for attachments (the integer
   fields in the Insert / Upload Media Gallery dialog), but could be used for any
   post type with distinct ‘menu_order‘ values (they all default to 0). ‘meta_value‘–
   Note that a ‘meta_key=keyname‘ must also be present in the query. Note also that
   the sorting will be alphabetical which is fine for strings (i.e. words), but 
   can be unexpected for numbers (e.g. 1, 3, 34, 4, 56, 6, etc, rather than 1, 3,
   4, 6, 34, 56 as you might naturally expect). Use ‘meta_value_num‘ instead for
   numeric values. You may also specify ‘meta_type‘ if you want to cast the meta
   value as a specific type. Possible values are ‘NUMERIC’, ‘BINARY’, ‘CHAR’, ‘DATE’,‘
   DATETIME’, ‘DECIMAL’, ‘SIGNED’, ‘TIME’, ‘UNSIGNED’, same as in ‘$meta_query‘.
   When using ‘meta_type’ you can also use ‘meta_value_*’ accordingly. For example,
   when using DATETIME as ‘meta_type’ you can use ‘meta_value_datetime’ to define
   order structure. ‘meta_value_num‘ – Order by numeric meta value (available since
   version 2.8). Also note that a ‘meta_key=keyname‘ must also be present in the
   query. This value allows for numerical sorting as noted above in ‘meta_value‘.‘
   post__in‘ – Preserve post ID order given in the post__in array (available since
   version 3.5). Note – the value of the order parameter does not change the resulting
   sort order. ‘post_name__in‘ – Preserve post slug order given in the ‘post_name__in’
   array (available since Version 4.6). Note – the value of the order parameter 
   does not change the resulting sort order. ‘post_parent__in‘ -Preserve post parent
   order given in the ‘post_parent__in’ array (available since Version 4.6). Note–
   the value of the order parameter does not change the resulting sort order.
 *  [jvalordv](https://wordpress.org/support/users/jvalordv/)
 * (@jvalordv)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/posts-ordering/#post-13050358)
 * Hello,
 * To add to this, I have a weird issue where ordering by title does so in reverse
   alphabetical order. Any help would be appreciated.
 * Edit: Nevermind, adding the order=”ASC” parameter solved the issue.
    -  This reply was modified 5 years, 9 months ago by [jvalordv](https://wordpress.org/support/users/jvalordv/).

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

The topic ‘Posts ordering’ is closed to new replies.

 * ![](https://ps.w.org/display-posts-shortcode/assets/icon-256x256.jpg?rev=2940963)
 * [Display Posts - Easy lists, grids, navigation, and more](https://wordpress.org/plugins/display-posts-shortcode/)
 * [Support Threads](https://wordpress.org/support/plugin/display-posts-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/display-posts-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/display-posts-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/display-posts-shortcode/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [jvalordv](https://wordpress.org/support/users/jvalordv/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/posts-ordering/#post-13050358)
 * Status: resolved