Chapter State Query
Change ‘category_name’ to the name of the state tag (currently chapter-state) and value to the state value.
// WP_Query arguments
$args = array (
'post_type' => array( 'chapter' ),
'category_name' => 'alabama',
);
// The Query
$chapter_state = new WP_Query( $args );
// The Loop
if ( $chapter_state->have_posts() ) {
while ( $chapter_state->have_posts() ) {
$chapter_state->the_post();
// do something
}
} else {
// no posts found
}
// Restore original Post Data
wp_reset_postdata();