My custom posts don't have a title, rather they rely on custom fields, and all the solutions I've tried so far seem to work if the title is present.
<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = array(
'post_type' => 'people',
'posts_per_page' => 40,
'meta_key' => 'surname',
'orderby' => 'meta_value',
'order' => 'ASC',
'paged' => $paged
);
// The Query
query_posts( $args );
?>
This should work (and it works for other custom post types that have a title), but I can't seem to get it working on the ones without. surname
is a custom field on the custom post type people
.