Hi,
I’ve searched the forum, and found some entries addressing shortcodes and custom fields, but I haven’t been able to figure this out, so I’m posting a new topic…
I have created a File Upload custom field, which will allow users to upload an audio file (MP3, Wav, etc.).
The Front End Display is “Audio Samples”
The HTML Variable Name is “audio”
This displays as its own tab (called, of course, “Audio Samples”) within the listing detail.
Currently, when a listing has an audio file upload, the Audio Samples tab simply displays the filename as clickable text (i.e. to download the file). For example, if somebody uploads sample.mp3, then on the Audio Samples tab it displays:
Audio Samples:
What I would like to do is wrap the filename in the built-in WordPress [audio] shortcode, so that instead of displaying the filename, it would display the file(s) in an audio player.
The shortcode that would need to be inserted into the tab would be:
[audio src="https://path/to/audio/sample.mp3"]
I’ve seen this post: https://wpgeodirectory.com/formidable-forms-in-geodirectory-tabs/ and it looks like I might be able to adapt that code…but I’m just wondering if my assumption is correct?
Any help would be greatly appreciated!