Home › Forums › Add-ons › Flexible Content Field › Flex Content in Repeater › Reply To: Flex Content in Repeater
Finally figured it out. Hope this helps someone else out!
<!--ORBIT SLIDE-->
<?php
if (have_rows('add_resorts_hero_image_slide', 'option')) {
while (have_rows('add_resorts_hero_image_slide', 'option')) {
the_row();
if (have_rows('choose_resorts_hero_slider_content')) {
while (have_rows('choose_resorts_hero_slider_content')) {
the_row();
$herovideo = get_sub_field('add_resorts_hero_slider_video');
$heroimage = get_sub_field('add_resorts_hero_slider_image');
$heroimgsize = 'hero-image';
$heroimg_array = wp_get_attachment_image_src($heroimage, $heroimgsize);
$heroimg_url = $heroimg_array[0];
if( get_row_layout() == 'resorts_slider_video' ) {
echo '<li class="video orbit-slide">';
echo '<img class="background" src="http://localhost.com/vail/tier2-hero-placeholder.jpg" />';
echo '<div class="container">
<div class="watermark"></div>
<iframe id="heroorbitslider-video"
src="'. $herovideo .'"
width="100%"
frameborder="0"
scrolling="no"
allowFullscreen="true"
allowFullScreen="true"
webkitAllowFullScreen="true"
mozAllowFullScreen="true">
</iframe>
</div>';
echo '</li>';
}
elseif( get_row_layout() == 'resorts_slider_image') {
echo '<li class="orbit-slide">';
echo '<img class="background "src="'. $heroimg_url .'" />';
echo '</li>';
}
}
}
}
}
?>
<!--END ORBIT SLIDE-->
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.