Building a List of Posts grouped by custom taxonomy as the section header only to be displayed if at least one post is in that tax
You are looping through all states and running a query on each iteration, but the query you are doing is nothing to do with the loop. You are checking for $_GET[‘state’], which would be the state passed over the query string. <?php foreach ( $states as $state ) { $state_query = new WP_Query( array( ‘post_type’ … Read more