There are two parameters you use to order posts retrieved by WP_Query : order and orderby . As you'd expect, order defines the order in which posts will be output in the loop, and orderby defines which field in the database they'll be sorted by.
There are two parameters you use to order posts retrieved by WP_Query : order and orderby . As you'd expect, order defines the order in which posts will be output in the loop, and orderby defines which field in the database they'll be sorted by.