Is there a way I can return terms by name using a shortcode?
This is the solution to get post terms by taxonomy by shortcode: /** * Custom shortcode to get terms */ function ALC_post_terms_by_taxonomy( $atts ) { global $post; $taxonomyTerms = wp_get_post_terms( $post->ID, $atts[‘taxonomy’], ‘orderby=name&hide_empty=0’ ); $term_array = array(); foreach ($taxonomyTerms as $taxonomyTerm) { $term_array[] = $taxonomyTerm->name; } return implode( ‘, ‘, $term_array ); } add_shortcode(‘get_terms_by_taxonomy’, ‘ALC_post_terms_by_taxonomy’); … Read more