I'm looking to display a slug list of the taxonomy term for the current post within the loop.
<?php $terms = get_the_terms( $post->ID, 'wpsc_product_category' ); if ( !empty( $terms ) ){ $term = array_shift( $terms ); echo $term->slug; } ?>
The function I have currently works, although it's only displaying the slug of the first taxonomy term, and not all of them.
e.g. One post is assigned to multiple wpsc_product_category
, but only the first term is being display on the front-end, and not a list of all of them.
Any suggestions on how to achieve this would be greatly appreciated.