0

How would I create an archive page(loop) for edd products (music files) with an audio player, so that users can play every song of the loop without leaving the page?

0

You can follow the exact same procedure as explained here by making the player be a custom taxonomy each song a custom post type.

A custom taxonomy will serve as a group of songs. Just like you give a category to an article, here you give a song, a playlist. You can set this up so you have a many to many relationship. Once you have this backend structure, you can then set up your post meta and term meta so that you can either give soundcloud ids to songs or upload it on your media handler, whatever floats your boat. Once this is correctly done, you can look into the actual player itself, you have millions music players as js/jquery libraries.

With this set up you have:

  • single-songs (your custom post type single page) this represents your song itself, contains the information about each song: length, title, categories, artists and in which playlist this is contained

  • taxonomy-player: this is a custom taxonomy that contains terms. These terms are playlists. Each term is then used to build the playlist. It's a simple way to make groups of things, just like a playlist is a group of songs.

To then display these playlists you can create a shortcode that will get_posts($args) for a specified term. You can get meta data of each term by using get_term_meta and song specific information with get_post_meta

Conceptually, this is how it works.

  • I don't see how each file would be embedded into audio and the rest queued up to be played using a player. Please elaborate on that. – Kevin Oct 10 '16 at 21:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.