Add title parameter to [audio] shortcode?
-
Is it possible to add a title parameter to the default WP [audio] shortcode?
I’ve created a site with hundreds of original audio tracks for music lessons. We have been using the mp3-jPlayer plugin, but that plugin has been abandoned so now I need to do something different and revise all of the existing shortcodes.
The default WP audio player would be okay, except that I need to display the title of the audio track. Many of the mp3 files did not include a title in the metadata, and pulling a title from the media attachment would be complicated because the existing shortcodes use the URL of the audio file, not the attachment ID.
The mp3-jPlayer plugin allowed us to set the track title manually in the shortcode, like this:
[audio mp3="https://www.jamalong.org/wp-content/uploads/2018/11/backing-track-pallet-on-your-floor-A.mp3" title="Pallet on Your Floor - A" loop="y"][/audio]
Is there a way to hack the default WP audio shortcode to display the existing titles?
- The topic ‘Add title parameter to [audio] shortcode?’ is closed to new replies.