I’m displaying posts currently using the WP_Query, which doesn’t include the state taxonomy within the $args because I do not want the state to be within the query. But I do want to display the state. I’m displaying the post’s corresponding state taxonomy via get_the_term_list($post->ID, ‘state’). My task is how to use WordPress functions to display the posts alphabetically by the state taxonomy.
I'm thinking I can include the value from the corresponding state taxonomy and include it within a new array which will also include the WP_Query post data that I want to display as well. Then I can use PHP's usort() function to sort through the new array by state taxonomy.
I'm having trouble executing this properly.