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

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

Source: wordpress

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.