Are you looking to add Audio files to your WordPress website? As a matter of fact, WordPress is by default capable of handling audio files. Most beginners are unaware of this.
In this blog, we will show you how to add audio files and create playlists in WordPress.
Which are the Supported Audio File Formats in WordPress?
HTML5 audio tag is used by WordPress to insert audio files. This audio file format is easily accessible from every modern device and works incredibly well from mobile devices. HTML5 audio tag is compatible with MP3, OGG and WAV file formats.
The most commonly used and widely popular audio format is MP3 and I’ll always recommend you to use this format.
How to Add Single Audio Files in WordPress?
It is pretty simple to add a single file or music track to your WordPress page/post. Click on the add media button on the edit screen.
A media uploader will pop up on your screen. Click the upload file button to upload your audio file. Thereafter, click on the insert into post button. This audio file will be thus inserted into the post. In case you are using the visual post editor, you’ll be able to see the audio file inserted into your post. In case you are using the text editor, you’ll see the audio shortcode.
If you’re not satisfied with it, you can continue editing it or go ahead and save and publish it. You can also take a preview of your post before or after publishing it.
There is another mode of adding a single audio file : Upload it to the media library. To insert it into the post, you’ll have to copy-paste the URL in the visual editor. WordPress automatically inserts the URL for you. It is a similar process to what you do to insert YouTube Videos in WordPress by copy-pasting the URL.
How to Add an Audio Playlist in WordPress?
In a similar way to image galleries, audio playlists also can be added to your WordPress posts using the media uploader. Click on the Add Media button and insert the audio files.
Once you’re done with uploading audio files, you’ll have to select the files that you want to insert in the playlist. This can be done by clicking on create new playlist link in the left-hand column.
To rearrange songs, you’ll just have to drag and drop songs into the playlist. The track name along with image and artist name can be displayed. These details are integrated with the MP3 file’s IDT meta tags and is automatically displayed by WordPress.
After this, you’ll have to click on the insert audio playlist option. The playlist will be inserted to your post and you’ll be able to see it in the visual editor. Save your post and have a look at your playlist.
How to Edit Meta Information of Audio Files in WordPress?
It is possible for WordPress to get the meta information automatically from your chosen MP3 file. None-the-less, in case you want to change the meta information or your audio files in WordPress, don’t have any meta information, you can do that from the media uploader.
It can be launched by clicking on the Add Media button. Upload your audio file or if it already exists, the select it from the Media Library.
You can have a look at the attachment details once you’ve selected the audio file. This is the space where you can include track title, artist name, caption, album name and a brief description of the track.
This is information which will be displayed in the playlist and on single attachment pages.
WordPress automatically extracts the album cover images that are usually embedded with your audio file. This image will be stored in the media library and will be inserted whenever that particular track is included in a playlist.
In case you can add an image if your audio file doesn’t have a cover image. Go to Media » Library to choose the file you want and edit it from the edit link below it.
In case you’re viewing the media library in grid view, clicking on the audio file will open a popup. To edit the file, click on the Edit more details link at the bottom of the popup.
From the edit media page, you can edit meta information of your audio file as well as upload a featured image. This is the image which will be used when an audio file is added to a playlist.
How to Add Audio Files and Playlists to Sidebar Widgets?
WordPress by default doesn’t automatically insert audio file URLs. So, you need to enable the automatic embedding for text widgets, and then you need to enable shortcodes. Copy-paste this code in your theme’s function.php file or site-specific plugin.
After this, you can upload a file and copy its URL. Once you add a text widget to the WordPress, you can paste the URL into it.
WordPress will automatically embed the URL into media player to play your audio file.
To add a playlist, knowing the shortcodes with IDs of media files that you want to include in the playlist is a must.
Firstly, upload the audio file that you want to include in a playlist by going to Media » Add New.
After that, edit each and every file that you want to include in the playlist. Check on the edit link below the file in the library or edit more details link if you’re viewing the media in a grid view.
You’ll see a media file ID below the title field on the Edit Media page.
Now that you have the IDs of the file you want to add into the playlist, you can use the shortcode like this:[Playlist Ids=”1,18,26″]
Don’t forget to replace the ids with your file IDs.
Comment and let me know how did you like this post on how to add Audio Files in WordPress!