Add an Audio File to a WordPress Blog Post
The spoken word is a good thing to add to a WordPress blog post if you’re a politician or a used car salesman. And music is a good thing if you’re a musician. You can add an audio file to your blog posts.
Unfortunately, the audio file isn’t embedded in the blog post; it opens up in the web browser, in the same window, which is not a good thing because it takes visitors away from your blog. But there’s a workaround with a bit of HTML magic to get the file to open in another window.
The following steps show you how to add audio to a blog post:
1Create a new blog post.
Position your cursor where you want the link for the audio file to appear.
2Click the Upload/Insert icon at the top of the Add New Post window.
The Add Media dialog box appears. You have three choices: From Computer, From URL, and Media Library.
The second and third options give you the same options as uploading from your computer. The following steps show how to upload from your computer.
3Select the audio file and then click Open.
A dialog box appears telling you that WordPress is processing the file. When the file has been processed, the dialog box refreshes to show an icon to represent the audio file and the parameters you can edit.
4Accept the default title, or enter a title.
Because the title also functions as the name of the link, enter a title that reflects the content of the audio file.
5Enter a caption.
The caption appears below the audio file link.
6Enter a description.
The description appears if you choose the Attachment Post URL option in the next step.
7Choose a link URL.
The default link opens the file in another window. If you choose None, the file will be on your server, but it won’t be heard, at least from the blog post. If you choose Attachment Post URL, the entire post opens in the same window, but there’s a problem. When the link is clicked, the audio file plays in another window. Our advice is to select the default option and modify the HTML as shown in the following steps.
8Click Insert into Post.
The link to the audio file is inserted in the post.
9Click the HTML tab.
The HTML for the blog post appears.
10Modify the hyperlink for the HTML by adding target=_blank.
The code to play the audio file in another window.
11Finish the blog post and then click Publish.
When you click the link, the audio file will appear in its own player in another window or tab, depending on which browser you’re using.