How to Create a WordPress Audio library

This tutorial will show you how to create a WordPress audio library or MP3 player using our Posts Table Pro plugin. Your visitors will be able to find audio tracks and play them directly from a searchable and sortable table. They can play individual audio tracks or even complete audio playlists.

WordPress audio library plugin with gallery embedsAudio galleries are a popular feature of many websites. There are lots of reasons for wanting to know how to create a music library or audio track directory. You may be a band, artist, composer or musician and want to display your music 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.

Whatever your reason for creating a WordPress audio library, this tutorial will show you how to do it. You can watch me creating an audio directory in WordPress in the video tutorial above. If you prefer written instructions, I have provided these below.

Introduction

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.

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.

Create individual embedded audio tracks

  1. Add a new post within your custom post type – or if you’re using Pages or Posts, add a new Page or Post instead.
  2. Add a title.
  3. 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. Either upload a new audio track or select one that’s already in the Media Library. Select the audio track and click ‘Insert Into Post’. WordPress will automatically embed the audio track within the page as an audio player.
  4. 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.
  5. Add any other information that you want to display in the WordPress audio library such as tags, category, custom fields etc.
  6. Click ‘Publish’.

WordPress audio library plugin embedded

3. Create audio playlists

  1. Add a new post within your custom post type – or if you’re using Pages or Posts, add a new Page or Post instead.
  2. Add a title.
  3. 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.
  4. Select all the audio or music tracks that you want to include in the playlist and click ‘Create a New Playlist’.
  5. 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.
  6. Finally, click ‘Insert Audio Playlist’. WordPress will automatically create and embed your playlist.
  7. Add a description in the Excerpt box (optional) and any other information to be included in the WordPress music audio library.
  8. 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.

WordPress audio library plugin

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.

  1. 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.
  2. Add a title for the page, e.g. ‘Audio Library’.

WordPress audio library gallery

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.

I recommend using the knowledge base to configure the shortcode to your exact needs. There are lots of options but I’ll provide a suggested way to create a WordPress audio library below.

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…

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:
WordPress audio library

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.

You can show or hide the search box etc. and much more. 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 directorypublications database, content table of pages or posts, or a list of upcoming events? With the WordPress table plugin, the possibilities are endless!

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 13% for recommending it! 

Posts Table Pro comes with full support so please get in touch if you need any help or advice setting it up.