I have found these two resources:
http://www.advancedcustomfields.com/resources/how-to/how-to-query-posts-filtered-by-custom-field-values/
and
http://www.advancedcustomfields.com/resources/how-to/orde-posts-by-custom-fields/
which individually address what I want to do, just not too sure how to integrate them together – as in query a CPT by a custom field and display in ascending order of another one (the second being a number field).
Using both the above examples together would mean setting the ‘meta_key’ part of the query args twice which won’t work.
Any help would be great, cheers
Solved it. For reference, build the query as if your were querying multiple custom fields. This frees up the ‘meta_key’ option for use in ordering.
Example:
'post_type' => 'post',
'showposts' => -1,
'meta_query' => array(
'relation' => 'AND',
array(
'key' => 'acf_field',
'value' => 'acf_field_value',
'compare' => '='
)
),
'meta_key' => 'acf_number_field',
'orderby' => 'meta_value_num',
'order' => 'ASC'