·
Music, WordPress
WordPress 3.6 - Native Support for Audio
While I was messing around with WordPress 3.6 and audio capabilities, I decided to the test the native support for audio.
[audio mp3="https://kevmarsden.mystagingwebsite.com/wp-content/uploads/2013/08/Trojans.mp3"][/audio]
Here are a couple things to watch out for:
- Your host or settings may limit the size of on file uploads. To get around that limitation you can upload the file via FTP. But if you do that the file won't show up in your Media Library. If this is the case, download the Add From Server plugin. This plugin adds a link in the Media Library which allows you to add file from your server to the Media Library. From there, it's easy to embed in your post.
An alternative is to use FTP and then wrap the link to the file in audio shortcode. Here's an example:
[`<code style="display: inline;">audio mp3="https://www.kmarsden.com/wp-content/uploads/2013/08/Trojans.mp3"`<code style="display: inline;">]
-
Get rid of the spaces in your file names. The media player won't work if the song/video has spaces in the name.
-
Not all browsers will support the mp3 embed. See the Codex for fallback methods.
-
The width of the audio player is set to 100%. You can change this by setting a smaller width in your child theme's style.css. This is what I did:
.mejs-container {
max-width: 400px;
}
Just don't go much lower than 200px;