A closing parenthesis was missing in my example
$args = array( 'numberposts' => -1, 'post_type' => 'OGs', 'orderby' => 'meta_value', 'order' => 'ASC', 'meta_key' => 'city', 'meta_query' => array( array( 'key' => 'state', 'value' => 'texas', ), ) );
I tested my code in a fresh install of WP, it outputs all the posts with a state value of texas (text input custom field named state) and sort by city alphabetical (with another text input custom field named city).
the only difference in my test is that i didn’t test with the same post_type, let me know if you still having issues.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!