• Hi,

    I’m trying to code some templates for the post formats feature and all has gone well until I’ve finally reached the content-video.php file.

    Basically, I’m trying to follow the post formats uses posted on the WordPress Codex – so all I want to do is grab the first video/audio file from the post and display the media player.

    Anyone have any ideas on how to achieve this?

    I was planning to scan the content with PHP’s preg_match but there’s no obvious starting and ending point to the video to use.

    I’m using the media player included in WP core btw.

The topic ‘Getting First Video/Audio from Post’ is closed to new replies.