Created
August 10, 2017 12:38
-
-
Save imbdev/248bfbd507e47cff33eee74b37386918 to your computer and use it in GitHub Desktop.
ACF WP PHP FLEXIBLE CONTENT LOOP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<figure class="video-box"> | |
<div class="video"> | |
<?php if( have_rows('choose_video_type') ) : ?> | |
<?php while ( have_rows('choose_video_type') ) : the_row(); ?> | |
<?php if ( get_row_layout() == 'wistia_video' ) : ?> | |
<?php the_sub_field('wistia_video_code'); ?> | |
<div class="embed-responsive embed-responsive-16by9"> | |
<script src="https://fast.wistia.com/embed/medias/qbk5zsvwii.jsonp" async></script><script src="https://fast.wistia.com/assets/external/E-v1.js" async></script><div class="wistia_responsive_padding" style="padding:50.25% 0 0 0;position:relative;"><div class="wistia_responsive_wrapper" style="height:100%;left:0;position:absolute;top:0;width:100%;"><div class="wistia_embed wistia_async_qbk5zsvwii videoFoam=true" style="height:100%;width:100%"> </div></div></div> | |
</div> | |
<?php elseif( get_row_layout() == 'youtube_video' ) : ?> | |
<?php the_sub_field('youtube_video_id_only'); ?> | |
<div class="embed-responsive embed-responsive-16by9"> | |
<iframe class="embed-responsive-item" src="https://www.youtube.com/embed/eJnWPhSQjPs?wmode=opaque&autoplay=0&loop=1&controls=1&showinfo=0&rel=0"></iframe> | |
</div> | |
<?php endif; ?> | |
<?php endwhile; ?> | |
<?php endif; ?> | |
</div> | |
</figure> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment