Site icon Hip-Hop Website Design and Development

Create loop from chosen phrases in ACF taxonomy area

This appears like a straightforward query however I simply can not get it to work.

I’ve a fundamental customized publish loop displaying posts based mostly on a taxonomy of location and might then manually change the phrases to point out posts tagged with the identical time period. All works advantageous.

What I’m attempting to do is change the guide time period choice for an ACF taxonomy area referred to as ‘case_study_location’, so what ever time period is chosen there then reveals the proper posts in my loop. I’ve tried many various issues however can not get it to work.

Right here is my loop

<?php 

$loop = new WP_Query( array( 
                'post_type' => 'case_studies', 
                'posts_per_page' => 3, 
                'post_status' => 'publish',
                'tax_query' => array(
array(
'taxonomy' => 'location',
'area' => 'slug',
'phrases' => 'location-two'
)
) ) ); ?>
                
            <?php whereas ( $loop->have_posts() ) : $loop->the_post(); ?>

                        <h3><?php the_title(); ?></h3>
                        <?php the_terms( $post->ID, 'location', 'classes: ', ' / ' ); ?>

            <?php endwhile; wp_reset_query(); ?>