I have this query:
$new = new WP_Query(array('post_type'=>'support','order'=>'DESC', 'meta_key'=>'post_views_count', 'orderby'=> 'meta_value_num', 'posts_per_page'=>'20'));
the result set is pulling the correct number of posts, from the custom post type support
but the posts are not ordered by the meta_value.
I cannot fathom why this is as the codex shows this is the correct way to order by a custom meta value?
I had trouble with a similar issue of sorting posts from a custom post type in a specified order on their archive page. I used http://wordpress.org/extend/plugins/sort-query-posts/.
The plugin lets you sort posts by author, comment_count, date, id, menu_order, modified, parent, or title. It only requires you to add the following lines
to your code, before the loop. Where ‘sort_type’ is the item by which your posts are sorted and ‘order’ is asc, desc, or rand. (very clear instructions in the short readme file).