Support

Account

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-->