This members-only tutorial provides the steps to
- register a `audio` Custom Post Type
- use Advanced Custom Fields plugin to add mp3 and ogg files upload fields when editing the CPT entries
- set up a template in Oxygen for the CPT archive page to show the entries in a grid with Play/Pause button overlayed on top of the featured image
Step 1Install and activate Custom Post Type UI. Go to CPT UI > Add/Edit Post Types. Add
audiopost type like so: In the Settings section, set "Has Archive" to True. Click "Add Post Type" button.
Step 2Install and activate Advanced Custom Fields. Go to Custom Fields > Tools and import this (mirror) field group. This should import a "Audio Meta" field group having
oggcustom fields (both set to return URL). Ensure that the field group is attached to the audio CPT.
Step 3Go to Audio Tracks > Add New. Add your audio post type entries with Title, Content, mp3, ogg files and featured image for each.
Step 4Go to Oxygen > Templates. Add a new template named say, "Audio Archive". Apply it to
audiopost type archive with a priority of 1 (or more depending on how your template for sitewide archives is setup). Edit it with Oxygen. Add a Section. All the following elements are to be added inside this Section. a) [optional] Add a Heading element. Double click the placeholder text, click on "Insert Data" button at the top and click on "Archive Title". This will replace the text with dynamic title of the post type archive (once you click off of the element). b) Add an Easy Posts element. Template PHP:
This is a premium members-only content.
To view the rest of the content, please sign up for membership ($47/month or $499 one-time).
Already a member? Log in below or here.