Adding audio files like podcasts to your WordPress posts increases engagement and keeps visitors on your site longer, which is great for your stats. This guide shows how to embed audio.
Some people prefer listening to reading and an audio recording of a long post will be appreciated by some of the visitors to your blog or website. They can set it playing or download it to their phone and listen to it while doing something else, like working out at the gym for example.
Have you thought about creating an audio recording of a post? There are apps for computers, phones and tablets that make it very easy to record yourself.
There are many fans of podcasts and you can build up quite a healthy following by regularly posting new podcasts to your website or blog.
But how do you present audio files and podcasts in WordPress posts? It is actually easier than you might think.
Insert audio files in posts
1 Write your post
At any point in a post, just position the cursor where you want the audio file and then click the Add Media button.
2 Upload and select an audio file
The media library appears and note that the name is ‘media’ and not ‘photo’ library because it can handle audio, video and photos. You can upload audio files in MP3, OGG and WAV formats, and MP3 is a good choice because the file sizes are small and the format is widely supported.
Upload one or more audio files in the usual way, such as by dragging and dropping them from the computer’s disk, and then select the one you want to insert into the WordPress post.
The information on the right is automatically taken from the audio file if it contains it. If there is no information or if the information is not what you want, fill in the boxes yourself with Artist, Album, Caption and Description. You can include as much or as little information as you need.
3 Insert an audio file
In the bottom right corner is an option to Embed Media Player, Link to Media File or Link to Attachment Page. Select the embed option if you want people to be able to play this on the page in their browser.
When you return to the post editor, the audio file looks like this:
There is a neat little audio player and it looks exactly the same to visitors reading the post. They can click the play button and listen to the music.
4 Insert a link to an audio file
What happens if you choose the option to insert a link to the media file? Here I added the same audio file again, this time with the option Link to Media File:
I added some text before and after the link to tell people how to download and save the audio file. You just right click it and save it. If you left click it, a play control is displayed in the middle of the screen and there is a download button on that.
So now we can let people listen in the browser or save a file to disk.
5 Edit the audio controller
Click the audio controller and then click the pencil icon to edit it.
6 Autoplay and looping
There are options to enable the audio file to automatically begin playing as soon as the web page is viewed. (It even autoplays in the post editor too!) There is also an option to loop the sound. In other words, it repeats forever, or at least until the user clicks the pause/stop button.
If you want to drive people nuts, put the audio player at the bottom of the page where they will not see it, set it to autoplay and loop!
7 Add a featured image
It is possible for audio files to contain text information like the artist, track name, album and so on. They can also contain album artwork.
If an audio file does not have artwork, go to the Media Library and select the audio file. At the bottom of the right-hand panel is this link:
Click Edit more details and in the panel on the right is an option to set a featured image (just as there is with WordPress posts). Click the link to set the featured image and upload or choose one.
My audio file is frogs croaking, so I set an image of a frog, in case you are wondering.
Why is this needed? It shows up when playlists of audio files are created, as we will see.
Create an audio playlist for a post
Suppose you have a collection of audio files that you want the reader to be able to choose from and listen to. One way to do present this would be to simple insert more audio files as before as a series of separate controllers.
There is a better way of presenting multiple audio files, such as a collection of podcasts or music tracks.
1 Select audio files
Place the cursor in the post editor where you want the playlist to appear and click the Add Media button. Filter the media library by selecting Audio.
(I have been really lazy and have only set one featured image. Ideally you should set a featured image for each audio file if it has none.)
Click Create Audio Playlist on the left. And then in the bottom right corner of the page, click the Create a new playlist button.
2 Rearrange the order
The audio files in the playlist are shown and you can click and drag them to rearrange the order.
When you are happy, click the Insert audio playlist button in the bottom right corner of the page.
3 The finished playlist
Here is how it looks when it is inserted. There is a player at the top and the first file is ready to play – you can see the featured image and the title. The other audio files are listed below and the length is on the right.
Clicking any audio file in the list plays it. (That’s a screenshot above, not a real playlist.)
This is a pretty clever feature of WordPress and it can all be done without needing any plugins. It is simple, looks good and works well.
Now go and get some audio files to add to your blog or website.