How can I add WordPress Audio Player as featured audio in Audio Blog Posts?

so I took a look at your updated code, and it looks like where you’re writing:

$audio_url = get_post_meta($post->ID, '$key', true); //this is getting your custom field url

You forgot to replace ‘$key’ with the actual string name of the meta you’re looking for, which judging from your functions, is called ‘link’. So I edited it with:

$audio_url = get_post_meta($post->ID, 'link', true); //this is getting your custom field url

And the player showed up no problem.

You also might want to edit your functionality so that it either grabs the first file on the dropdown as it’s default value or doesn’t look for the $link = $custom[“link”][0]; values until the user has chosen something because on a post that doesn’t have a file picked yet, I’m getting a “Undefined index: link” notice on your meta box.

Let me know if it you get it working but so far – it’s looking good. 🙂