I am using the following query:
<?php $postslist = new WP_Query('meta_key=Ordermetakey&orderby=meta_value_num&order=ASC&posts_per_page=5');
To sort a small post list on the frontpage to show latest new. It needs to order them by a meta key and do this DESC. The strange thing is it shows the posts ASC even though i have put ASC in this query.
The value of the meta key is a date - time stamp: Example: 120403 = 03-04-2012
How can i make it work?
YYYYMMDD
format. The format you are using won't sort correctly. Consider the 11th November 2011 and 1st January 2012 .