Requested this on another thread and thinking I'd become an answer marked it as being solved.

I've got a custom publish type known as courses and also have a area within that known as pdf-order that essentially signifies whereby their email list the publish will show. I'm looking to get it to sort but am getting no luck.

This really is my code :

$course_loop = new WP_Query( array( 'post_type' => 'course',
                                    'posts_per_page' => 30,
                                    'meta_key' => 'pdf-order',
                                    'orderby'=> 'meta_value',
                                    'order' => 'desc' ) );

Can anybody shed some light about this for me personally?


Your original totally correct.

I additionally discovered this today within the codex

I suppose your CF 'pdf-order' are amounts.
But wordpress orders them alphabetically.
therefore if we've '1,2,3,10,11'
it'll order : 1, 10 , 11, 2, 3
rather than what you will expect (1,2,3,10,11)

So add beginning zero's therefore it would become: '001, 002, 003, 010, 011'

I really hope this can help