How to Add Audio Files and Create Playlists in WordPress
Would you like to include audio files on your WordPress site? WordPress is capable of processing audio files by default as a content management system. Many newcomers, however, are unaware of this. We’ll show you how to add audio files and make playlists in WordPress in this tutorial.
WordPress Audio File Formats Supported
To incorporate audio files, WordPress uses the HTML5 audio tag. It is compatible with the majority of modern devices, and it works especially well on mobile phones. MP3, OGG, and WAV files are supported by the HTML5 audio element.
When it comes to audio files, MP3 is the most extensively used and supported format, and we urge that you use it wherever possible.
WordPress: Adding a Single Audio File
It’s simple to add a single audio file or music track to any WordPress post or page. On the post edit screen, simply click the add media icon.
Then, on your screen, a media uploader box will open. To pick and upload your audio file, click on the upload file button. After you’ve uploaded it, click the insert into post button.
Your audio file will be embedded in the post by WordPress. You’ll be able to see the file embedded in your post if you’re using the visual post editor. You’ll notice the audio shortcode if you’re using the text editor.
You have the option of continuing to edit your post or saving and publishing it. You can preview your post after it’s been published, and you’ll see your audio file embedded like this.
Uploading a single audio file to the media library is another option for adding a single audio track. After that, simply copy and paste the file URL into the visual editor.
WordPress will incorporate the URL for you automatically. This is similar to how you embed movies in WordPress, where you simply paste the YouTube video’s URL and WordPress embeds it for you.
Using WordPress to Create an Audio Playlist
You may use the media uploader to add audio playlists to your WordPress posts, just like you do with image galleries. To contribute your audio files, simply click the add media button.
After you’ve uploaded your audio files, select the ones you want to include in the playlist and click the build new playlist option in the left column.
You may now drag and drop songs in the playlist to rearrange them. You may also make the track name, artist name, and image visible. This information is included in the IDT meta tags of your MP3 file and is displayed by WordPress automatically.
Simply click the insert audio playlist button when you’re finished. You’ll be able to see your playlist in the visual editor after it’s been added to your post. Now you can save your post and listen to a sample of your playlist.
Editing Meta Information of Audio Files in WordPress
Changing the Meta Information of Audio Files in WordPress WordPress can extract the metadata from your MP3 file automatically. If your file doesn’t have any meta information or if you want to edit it, you can do so through the media uploader.
To use the media uploader, click the Add Media button. You can either upload your audio file or click on it in the Media Library if it has already been submitted.
You’ll notice the attachment details column on the right once you’ve selected the audio file. This is where you can include the track’s title, artist name, album name, caption, and a brief description. This information will appear in playlists and on individual attachment pages.
If the audio file you submitted has an embedded image that will be used as the album cover, WordPress will extract it automatically. It’ll be saved in your media library and used when you add this track to a playlist.
If your audio file does not have a cover image, however, you can change it in WordPress and add one. Simply navigate to Media » Library, find the file you wish to modify, and click the edit link to the right of it.
When you click on an audio file in the media library’s grid view, a window will appear. To edit the file, go to the bottom of the window and click the Edit additional details option.
You’ll now be taken to the edit media page, where you can edit all of your audio file’s metadata as well as upload a featured image. When the audio file is put to a playlist, this image will be used.
Sidebar Widgets with Audio Files and Playlists
WordPress does not automatically incorporate audio file URLs by default. We must first enable automatic embedding for text widgets, and then enable shortcodes. Simply copy and paste this code into the functions.php file of your theme or a site-specific plugin.
You can now copy the URL of a file that you’ve uploaded to the media library. Paste the URL into a text widget in the WordPress sidebar.
To play your audio file, WordPress will automatically incorporate the URL into the media player.
To create a playlist, use the shortcode and the IDs of the media files you wish to include in it.
To begin, go to Media » Add New and upload the audio files you want to include in the playlist.
You must now edit each audio file that you wish to include in the playlist. Simply click the edit link beneath the file in the media library, or the edit more info link if you’re viewing the media library in grid view.
The media file ID may be found below the title field on the Edit Media page.
You can use the shortcode like this now that you have the IDs of the files you want to add to the playlist:
Remember to change the ids to your own file IDs. This shortcode can be used in a text widget. On our test site, it looked like this:
We hope this tutorial taught you how to use WordPress to add audio files and make playlists.