I am creating a new theme, and I am looking for a bit of guidance on how to display media in the posts themselves. Images work fine 'out of the box', but when you insert MP3's (and probably videos) WordPress just renders a link to their corresponding attachment page.
This is great (so I can link to the attachments direct) but I also want to be able to render that audio player in the post itself.
If anyone can point me in the right direction for what functions to use or where to start looking that'd be great.
An example is here:
You can see my two audio files are linked to at the bottom of the page, and if you click one you get taken to the attachment template where you can hear it - but what would I need to do to replace the links in the post above with my own markup?
I've seen plugins around I could use, but I am looking to write my own solution so I have control over the markup. I want to basically write out the post content but when audio or video attachments are found, it inserts my own markup in to handle them, then continues with the rest of the post.
Hopefully that's clear! Thanks very much