Hi vtxyzzy,
Thanks for your question, I wanted to filter query_posts so it would only return results based on a custom field value.
I managed to find out that I could use the object ID of the custom field. So for ‘meta_value’ I could use the value found from $field->ID.
The code I ended up using was:
wp_reset_query();
$args = array(
'post_type' => 'feature',
'orderby' => 'date',
'order' => 'ASC',
'posts_per_page' => 4,
'meta_key' => 'on_page',
'meta_value' => 2
);
query_posts( $args );
The meta_value I found by printing $field->ID.