mantismamita
4/9/2015 - 10:40 AM

flexslider with ACF and RICG plugin for WordPress

flexslider with ACF and RICG plugin for WordPress

$images = get_field('slides');

    if( $images ) : ?>
        <div id="slider" class="flexslider">

            <ul class="slides">
                <?php foreach( $images as $image ): ?>

                <?php if(function_exists('tevkori_get_srcset_array')){ ?>

                <?php $srcset= tevkori_get_srcset_array( $image['ID'], 'slide' );?>
                        <li>
                            <img sizes="<?php echo tevkori_get_sizes( $image['ID'], 'slide' ); ?>" srcset="<?php echo implode( ', ', $srcset ); ?>" alt="<?php echo $image['alt']; ?>" />
                        </li>

                <?php } else { ?>
                        <li>
                            <img src="<?php echo $image['sizes']['slide']; ?>" alt="<?php echo $image['alt']; ?>" />
                        </li>
                <?php } ?>

                <?php endforeach; ?>
            </ul>
        </div>
    <?php endif; ?>