‘This tutorial will show you how to create a WordPress audio library or MP3 player using the Posts Table Pro plugin. Your visitors will be able to find and play audio tracks directly in a searchable and sortable table. They can play individual audio tracks or even complete audio playlists.
Audio galleries are a popular feature of many websites. There are lots of reasons for wanting to know how to create a filterable music library or audio track directory. You may be a band, artist, composer or musician and want to display your music or sound effects on a single directory page with embedded audio. Maybe you’re a CD and want to include a track listing with samples. You might need to provide samples as part of an audio or music catalogue or directory. Perhaps you’re a voiceover artist and want to create an audio track library with examples of your work. Alternatively, your site might feature audio learning materials such as recorded tutorials or lectures, foreign language classes, or podcasts.
Whatever your reason for creating a WordPress audio library, this tutorial will show you how to do it using the Posts Table Pro WordPress table plugin.
You can watch me creating an audio directory in WordPress in the video tutorial below. If you prefer written instructions, I have provided these underneath.
The perfect WordPress audio library plugin
To create a WordPress audio library, you need to use our Posts Table Pro plugin. This lets you display various content from a WordPress website within a table, just like the audio and video gallery on the plugin demo site. As you can see in the table, the table contains embedded music tracks or MP3 players which you can listen to directly from within the table.
It’s a really neat way of displaying audio tracks. People can listen to them, play, pause and fast forward directly within the table.
Posts Table Pro also works as a WordPress audio playlist plugin. It creates a container for playlists by listing them in a table-like directory structure. You can listen to playlists and navigate between the tracks from the table. People don’t have to click through to a separate page to listen to them – it’s all on one page.
You can use Posts Table Pro to display audio players and playlists created using the audio shortcodes that come with WordPress itself. I’ll also share some third party WordPress audio plugins that can be used to display more fancy audio players in Posts Table Pro.
Read on to learn how to use Posts Table Pro to create a filterable WordPress audio library.
Perfect product for my application
What type of audio can you include in a WordPress audio library?
These days, people use audio files for a huge variety of purposes. The good news is that you can publish any of these in a WP audio library. This includes:
- Multiple audio file formats MP3, WAV, MPEG and more.
- Types of audio recording Audiobooks, bands, choir music, foreign language lessons, karaoke backing tracks, orchestra music, relaxing background music, samples, singles and albums, podcasts, stock music (e.g. corporate background music, royalty free music, sound effects, etc.).
Case study – A WordPress audio library for Fascinated Sound
Fascinated Sound sell royalty-free sound effects and music tracks using the free Easy Digital Downloads plugin. They use our Posts Table Pro plugin to list over 600 downloadable audio products in a table-based WordPress audio library.
Each audio download is listed in a table with columns for audio player, title, description, category and add to cart button. You can click on a category in the table to filter by that category. There’s also a category filter dropdown above the WordPress audio library.
Customers can listen to each track by clicking on the embedded play buttons. The play buttons were created using the free Compact WP Audio Player plugin, which works perfectly with Posts Table Pro.
We love Fascinated Sound’s WordPress audio library because it’s such a user-friendly way to list and sell music and other audio products.
Need to create a WooCommerce audio library?
Since publishing this tutorial, a lot of people have contacted us about how to create a table of WooCommerce products with embedded audio players. You can do this using our other plugin, WooCommerce Product Table. This is very similar to Posts Table Pro but has full e-commerce integration. It has extra features for WooCommerce such as ‘Add to Cart’ buttons and ratings.
For example, Dosado used WooCommerce Product Table to sell audio files with embedded music players in the table.
The advice in this tutorial works equally for either plugin. Just replace the
[posts_table] shortcode with
[product_table] to create your WooCommerce audio library.
1. How to store your digital WordPress audio library
To get started, you need a WordPress website with the Posts Table Pro plugin installed.
You also need to think about how to store your digital music library or other types of audio tracks. A popular option is via a custom post type, for example an ‘Audio’ section in the left hand side of the WordPress admin where you store each audio track.
If you’re a developer, you can create a custom post type with the usual method. If not, you can use a plugin such as Custom Post Type UI.
Create a custom post type with all the fields that you want to display in the table – for example title, excerpt, categories, tags etc.
If you don’t want to use a custom post type, you can add your audio tracks on Posts or Pages. Posts Table Pro can display all sorts of content from a WordPress website.
2. Add the audio tracks in WordPress
Next it’s time to add your audio tracks. Here are instructions for using the plugin to add a standard embedded audio track and a full audio playlist. These instructions use the built-in WordPress audio and playlist shortcodes, which are part of WordPress itself. Later, I’ll show you how to create even more impressive-looking audio embeds using other plugins which work with Posts Table Pro.
Create individual embedded audio tracks
- Add a new post within your custom post type – or if you’re using Pages or Posts, add a new Page or Post instead.
- Add a title.
- Embed the audio track within the main content of the post. Posts Table Pro supports embedded audio within the main content or excerpt but it’s easier to add it to the content as you can use the Add Media button instead of having to enter the WordPress audio shortcode directly. Click the ‘Add Media’ button above the WordPress toolbar if you’re using the Classic WordPress Editor, or add an ‘Audio’ block if you’re using Gutenberg. Either upload a new audio track or select one that’s already in the Media Library. WordPress will automatically embed the audio track within the page as an audio player.
- You can also add an Excerpt (optional) which is useful for displaying a short description of the audio track. (If you can’t see the Excerpt box, click ‘Screen Options’ at the top of the page and make sure it’s ticked. If it’s not there, you need to activate excerpts for your custom post type.) In theory you can add a description within the main content, however this would display it in the same column of your audio database as the embedded audio track. If you add it within the Excerpt then this will appear as a separate column in the table.
- Add any other information that you want to display in the WordPress audio library such as tags, category, custom fields etc.
- Click ‘Publish’.
Host your audio files on a 3rd party website
Perhaps you’d prefer to host your music files on an external platform such as SoundCloud or Amazon S3 storage. You can easily do this using the same technique as the previous section.
The only difference is that when you click the Add Media button in WordPress, you need to click the ‘Insert from URL’ tab instead of uploading the file directly. Paste the URL of the audio track on the external website. If this is a valid audio file format (e.g. .mp3) then WordPress will embed the media player directly into the page.
3. Create audio playlists
- Add a new post within your custom post type – or if you’re using Pages or Posts, add a new Page or Post instead.
- Add a title.
- The next step depends on whether you’re using the Gutenberg or Classic WordPress editors:
- Gutenberg – Add a ‘Shortcode’ block and insert the WordPress Playlist Shortcode.
- Classic Editor:
- Click ‘Add Media’. Instead of clicking a specific MP3 or similar, click ‘Create Audio Playlist’. If you can’t see this link, it’s because you haven’t uploaded any audio tracks to your WordPress media library yet. Once you have uploaded some audio tracks, this link will appear.
- Select all the audio or music tracks that you want to include in the playlist and click ‘Create a New Playlist’.
- On the next page, you can add the track name underneath. This will appear on your playlist so make it as descriptive as possible – e.g. the song name. There are also some settings on the right, for example whether to display the artist name.
- Finally, click ‘Insert Audio Playlist’. WordPress will automatically create and embed your playlist.
- Add a description in the page Excerpt box (optional) and any other information to be included in the WordPress music audio library.
- Click ‘Publish’.
Use this technique for adding each of your audio tracks for the library, whether it’s individual music tracks or whole audio playlists.
4. Create a page for your WordPress audio library
Next you need to create a page and display the posts table on it, which will be used as your WordPress audio library.
- Go to Pages > Add New. You can put your audio directory on any page or post, or even in a widget. Most people would add it to a page.
- Add a title for the page, e.g. ‘Audio Library’.
5. Use Posts Table Pro to display the audio library
We will now add a Posts Table Pro shortcode to display a WordPress audio library with the embedded audio tracks. You will add this to the page you just created in step 4.
Type [posts_table post_type=”audio”] into the page. Replace ‘audio’ with the slug for your custom post type. This tells Posts Table Pro to display posts from your audio custom post type. If you’re using standard WordPress posts, you can just enter [posts_table].
This will display all your audio posts, but it won’t look like a proper audio library yet. So keep going…
Add columns to the WordPress audio library
Next, you need to tell Posts Table Pro which columns to display in the WordPress audio library. For example, the following shortcode will display 3 columns the main content where we embedded the music track (which I have relabelled ‘Listen Now’); Title; and Excerpt (which I have relabelled ‘Description’):[posts_table post_type=”audio” columns=”content:Listen Now,title,excerpt:Description”
Finally, you need to add 2 more options to the shortcode. shortcodes=”true” tells Posts Table Pro to display the actual content of the shortcode, so that it will show your embedded audio tracks. links=”none” is optional and will unlink the title of each post so that people can’t click through to the single post page – add this if you want to keep everything on your main media library page with nowhere for people to click to.
Your final shortcode should look something like this:[posts_table post_type=”audio” columns=”content:Listen Now,title,excerpt:Description” shortcodes=”true” links=”none”]
And your audio directory will look something like this:
This has created a nice WordPress audio library listing all your music tracks. You can add as many as you like.
If you have lots or music tracks or audio playlists then the plugin will add pagination buttons at the bottom. You can configure the audio library to choose how many display on each page by default.
Keep improving your filterable media library
The Posts Table Pro WordPress audio library plugin has literally dozens of options for configuring your music gallery. Add filter dropdowns above the audio table, so that users can quickly find what they want based on category, tag or custom taxonomy. You can show or hide the search box, and much more. There’s even a lazy load option to speed things up for larger audio libraries.
Use the knowledge base to have a play and find out the different ways you can use the Posts Table Pro WordPress plugin to create a database of your audio tracks and playlists.
And once you’ve mastered audio galleries, why not use the same plugin to create a WordPress video gallery? Or if you’re feeling really clever, use it to create a WordPress document library, member directory, publications database, content table of pages or posts, or a list of upcoming events? With the WordPress table plugin, the possibilities are endless!
Recommended third party WordPress audio plugins
So far, I’ve shown you how to display the built-in audio and playlist shortcodes in a searchable WordPress audio library.
If you don’t like how the basic players look or function, then you can enhance these by adding a third party audio plugin instead. Here are some that work nicely with Posts Table Pro.
Compact WP Audio Player
If space is at a premium in your WordPress audio library, then this is an ideal plugin to add small audio players to the table.
To display a compact audio player in any of the fields in your Posts Table Pro audio library, just install the plugin and add the shortcode
[sc_embed_player fileurl="URL OF THE MP3 FILE"].
Seriously Simple Podcasting
Seriously Simple Podcasting is a free WordPress podcasting plugin that’s ideal for anyone wanting to create an audio library or archive of podcasts. It works perfectly with Posts Table Pro, and you can even skip step 1 of this tutorial (above) because it creates a custom post type for your podcasts. You can quickly upload your podcast archive and display them in a filterable table with Posts Table Pro.
If you’re looking to do your own WordPress podcast hosting, then this is a really easy and effective way to do it.
It’s time to create a WordPress audio library!
So now you know how to create an audio library in WordPress. Now it’s your turn. Follow the steps in this tutorial to create your own WordPress audio library or music directory. To get started, download Posts Table Pro today – it’s one of the best WordPress audio plugins around. And if you like it, join our WordPress plugins affiliate scheme and earn 30% for recommending it!
Trying to achieve a similar approach – and harness the incredible power of a filterable, sortable, and searchable table – but with podcasts? Then see our post on how to create your own podcast hosting with WordPress, which shows you exactly how.
Posts Table Pro comes with full support so please get in touch if you need any help or advice setting it up.