Audio Shortcode

Display HTML5 audio in your pages and posts

NOTE: There are different "paths" for HTML5 audio because different browsers (Firefox, Chrome, Safari) use different audio formats. Current audio browser capability can be found at W3 Schools

Shortcode:

[audio]

Attributes:

id
This is the "name" of the audio. It is used as an identifier if you have multiple audio on the same page. Use any string for this value (e.g. "myAudio") but each one needs to be unique

mp3path
Should have the value of the path to an .mp3 audio file somewhere either on your server or elsewhere on the Internet.

oggpath
Should have the value of the path to an .ogg audio file somewhere either on your server or elsewhere on the Internet.

wavpath
This is optional and only needs to be used if you are playing a .wav file. Should have the value of the path to an .wav audio file somewhere either on your server or elsewhere on the Internet.

Examples:


The following will display HTML5 audio...

[audio oggpath="https://yourwebsite.com/song.ogg" mp3path="https://yourwebsite.com/song.mp3"]
Back to Shortcodes »