mantismamita
4/8/2015 - 6:26 PM

flexslider markup in WordPress (uses ACF)

flexslider markup in WordPress (uses ACF)

$images = get_field('slides');

    if( $images ) { ?>
        <div id="slider" class="flexslider">
            <ul class="slides">
                <?php foreach( $images as $image ): ?>
                    <li>
                        <img src="<?php echo $image['sizes']['large']; ?>" alt="<?php echo $image['alt']; ?>" />
                    </li>
                <?php endforeach; ?>
            </ul>
        </div>
    <?php }