I'm attempting to call a custom field in an audio shortcode. The field I'm calling, enclosure, defines MP3 files that are associated with my respective posts. I'm using the PHP template editor in Wordpress. Here's what I have.
<?php echo do_shortcode('[audio src="enclosure"]');?>
I would like to insert the following code in place of the word "enclosure."
<?php echo get_post_meta($post->ID, 'enclosure', true); ?>
I either get the code displayed as text or nothing at all when I paste these snippets together. What am I missing?