Insert Audio from URL
The easiest way to embed an audio into post is to place its URL into the content area. Make sure the URL is on its own line and not hyperlinked (clickable when viewing the post).
WordPress Audio http://hostpulse-demo.net/wp-content/uploads/2017/08/sample-audio.mp3
WordPress will automatically turn the URL into an audio player embed and provide a live preview in the visual editor:
The Audio feature allows you to embed audio files and play them back using a simple shortcode
The following basic options are supported:
src (optional) The source of your audio file. If not included it will auto-populate with the first audio file attached to the post. You can use the following options to define specific filetypes, allowing for graceful fallbacks:
Default: First audio file attached to the post
Allows for the looping of media.
off - (default) Do not loop the media.
on - Media will loop to beginning when finished and automatically continue playing.
Causes the media to automatically play as soon as the media file is ready.
0 - (default) Do not automatically play the media.
1 - Media will play as soon as it is ready.
Specifies if and how the audio should be loaded when the page loads.
none - (default) The audio should not be loaded when the page loads.
auto - The audio should be loaded entirely when the page loads.
metadata - Only metadata should be loaded when the page loads.
Insert an Audio File from Media Library
In the editor in Visual mode click where you want your audio player to appear and click Add Media button. In the Insert Media screen select your audio file (to cancel the selection hover your mouse over check-mark sign and click when it will turns to a minus sign.
In the right-hand sidebar WordPress will display two sections - attachment details and attachment display settings.
Attachment Details - we encourage you to fill in all information as well as detailed keyword optimized description because all this information will be displayed in the attachment page that WordPress will generate automatically for your audio file. If you place a link to that page search engines will include it in their search result pages.
Attachment Display Settings - from the dropdown options you can embed media player as well as to generate two types of links. We’ll explore all three options.
Select Embed Media Player and click Insert into post button.
Click in the editor on a new row, click Add Media, select the same file and select the second option in Attachment Display Settings - Link to Media File. Click Insert into post button.
Repeat the last step selecting the last option - Link to Attachment Page and click Insert into post button.
Your editor in Text mode should look like the image below (we’ll edit the link text):
View Post in browser:
Media File page:
Edit Audio Details
To edit your audio file go to editor, in Visual mode click on the audio player and click on Edit button (the pencil icon):
In Audio Details screen you are provided with several editing options:
If you check the shortcode options we talked about earlier in the article you will notice these are the same options.
- Click on remove audio source to remove the audio file.
- Click ogg button to provide fallback file in ogg format.
- Select preload method.
- Select autoplay if you want the audio to start as soon as the page is loaded.
- Select loop if you want the file to play continuously (please, do not force your visitors to leave)
If you click Replace Audio link on the next screen you can select/upload new audio file:
Insert an Audio Playlist
Click in the editor where you want the audio playlist to be displayed and click the Add Media button.
In the Insert Media screen click Create Audio Playlist link:
In the Create Audio Playlist screen you can select audio files to include in your playlist and add attachment details for each file:
Click Create a new video playlist button:
In the Edit Audio Playlist screen you can use many editing options:
- remove, add new or reorder audio files (use Reverse order button or drag a file to a new position).
- edit caption
- show/hide trackllist
- show/hide artist name
- show/hide images
Click Insert Audio Playlist to finish editing.
Wordpress will automatically add this shortcode to your editor:
Update the post and View Post:
If you want to edit the audio playlist go to editor in visual mode, first click inside the playlist and then click on the pencil (Edit) icon:
In Edit Audio Playlist screen you can edit your audio playlist.
We hope this information will help you to offer your site visitors quality audio records that will increase the popularity of your WordPress site.