I have a CPT with a Taxonomy setup. I want to list the tags on the post that are attached to the CPT.
This is what I am using now in the CPT PHP. What am I doing wrong?
<?php $terms = get_the_terms( get_the_ID(), 'properties' ); if ( $terms && ! is_wp_error( $terms ) ){ foreach ( $terms as $term ) { echo $term->name; } } ?>I want to pull both taxonomies (property_types and amenities) because they’re linked to the properties CPT.
Thanks.