I'm trying to display the attributes of the current post. Here in the screenshot below I declared an attribute which is "Liquor Brands" with multiple values [![enter image description here][1]][1] Here is the code I'm currently working on <?php $liquor = new WP_Query( array( 'post_type' => 'product', 'product_cat' => 'liquors', 'meta_query' => array( array( 'key' => '_stock_status', 'value' => 'instock' ) ) ) ); if ( $liquor->have_posts() ) : while ( $liquor->have_posts() ) : $liquor->the_post(); ?> <?php $liquor_brands = get_terms('pa_liquor-brands'); foreach ( $liquor_brands as $liquor_brand ) : ?> <?php endforeach; ?> <div id="post-<?php the_ID(); ?>" class="three columns product-post"> <?php echo $liquor_brand->slug ?> </div> <?php wp_reset_postdata(); ?> <?php endwhile; else: ?> <?php //error message ?> <?php endif; ?> <?php wp_reset_query(); ?> Here is the screenshot of the output. It only shows the last value that I have set which is "very-old-captain-rum" [![enter image description here][2]][2] [1]: https://i.sstatic.net/ZIVgG.jpg [2]: https://i.sstatic.net/iGlFH.jpg