Code Snippet – Livestream

<section id="vikkidavisfitness-livestream">
<div style="margin-top:20px; width: 100%;">
<?php if (get_field('live_video_content')) :
    echo get_field('live_video_content');
endif; ?>
<?php if (get_field('live_video_id')) :
    $id = str_replace('https://www.youtube.com/watch?v=', '', get_field('live_video_id'));
?>
    <iframe title="Vikki Davis Live Stream" src="https://www.youtube.com/embed/<?php echo $id; ?>?rel=0" width="100%" height="450" frameborder="0" allowfullscreen="allowfullscreen" autoplay></iframe>
<?php endif; ?>
</div>
</section>
«
»