ACF custom taxonomy of custom post type in array

Trying to show posts by taxonomy chosen from custom field on a page (using acf). But can’t make it work. It shows all the products. Works fine when i use slug. So, apparently, my mistake is getting the field value. But can’t figure out where. Here is the code

<?php
    $args = array(
      'post_type' => 'products',
      'product-collections' => get_field('collection_1a'),
    );
    $prodsa = new WP_Query( $args );
    if( $prodsa->have_posts() ) {
      while( $prodsa->have_posts() ) {
        $prodsa->the_post();
        ?> 
        <li>
          <h2><?php the_field('pr_title_shown'); ?></h2>
          <p>$<?php the_field('prod_price'); ?></p>
        </li>
<?php } } else { echo ''; } ?>


Source: wordpress

Leave a Reply