Add audio file to post using custom term meta field as link

I am trying to add an audio file to my custom post type using a custom term meta field as a link, but I can’t get it right.

Here is how I would normally display a custom term meta field:

<?php $terms = get_the_terms($post->ID, ‘taxonomy-name’);
foreach ($terms as $term) {
$term_id = $term->term_id;
echo get_term_meta( $term_id, ‘term-meta-field-name’, true );
}?>

I’m assuming I have to turn it into a variable, but I’m not sure how. Any ideas?

<?php echo do_shortcode(link); ?>

Thanks!

Read more here:: Add audio file to post using custom term meta field as link

Leave a Reply

Your email address will not be published. Required fields are marked *