Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Video Loading Code
<?php
//video files uploaded into media library and saved to the post via Advanced Custom Fields
$webm = get_sub_field('webm');
$mp4 = get_sub_field('mp4');
$ogv = get_sub_field('ogv');
?>
<video class="video">
<source src="<?php echo $webm['url']; ?>" type="video/webm">
<source src="<?php echo $mp4['url']; ?>" type="video/mp4">
<source src="<?php echo $ogv['url']; ?>" type="video/ogv">
Your browser does not support the video tag.
</video>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.