Might look at Displaying_Posts_Using_a_Custom_Select_Query and adjust the code accordingly.
Also, Otto has info for adding an orderby value to query_posts in this thread:
http://wordpress.org/support/topic/157515?replies=5#post-699291
Thanks, I’ll check those out.
Fantastic, I got it working with the following code:
<ul class="crewlist">
<?php
$querystr = "
SELECT * FROM $wpdb->posts
LEFT JOIN $wpdb->postmeta ON($wpdb->posts.ID = $wpdb->postmeta.post_id)
LEFT JOIN $wpdb->term_relationships ON($wpdb->posts.ID = $wpdb->term_relationships.object_id)
LEFT JOIN $wpdb->term_taxonomy ON($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id)
WHERE $wpdb->term_taxonomy.term_id = 4
AND $wpdb->term_taxonomy.taxonomy = 'category'
AND $wpdb->posts.post_status = 'publish'
AND $wpdb->postmeta.meta_key = 'crew_order'
ORDER BY $wpdb->postmeta.meta_value ASC
LIMIT 9
";
$crew_order = $wpdb->get_results($querystr, OBJECT);
?>
<?php if ($crew_order): ?>
<?php foreach ($crew_order as $post): ?>
<?php setup_postdata($post); ?>
<li><?php if ($currentId!==$post->ID) { ?><a href="<?php the_permalink();?>"><?php the_title(); ?></a><?php } else { ?><?php the_title(); ?><?php } ?></li>
<?php endforeach; ?>
<?php endif; ?>
</ul>
Is there any way to get it to auto paginate once the LIMIT has been reached?
Thanks so much for the help.
Regarding pagination –
I found some great help from Aesqe here:
http://wordpress.org/support/topic/154300?replies=7
But I can’t get it working with the Paginav plugin. Anyone have any thoughts?