wordpress snippets last updated   : October 6, 2014
we now have 641 snippets

Shortcode for HTML5 audio in posts and pages

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will create a new shortcode for HTML5 audio. Just add the second snippet of shortcode to a post or page to add HTML5 audio.

read more

Custom metabox listing all audio files from media library

wordpress snippet

I wrote this for a recent project because a client needed an easy way to attach audio files to the post without custom fields complicating things. Adding this snippet to the functions.php of your wordpress theme will add a metabox to your post editing screen with a select menu containing all audio files. Add the second snippet to display the specified audio URL in your wordpress theme.

read more