Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

acf gallery

<?php 
$images = get_field('gallery');
$size = 'full'; // (thumbnail, medium, large, full or custom size)
if( $images ): ?>
    <ul>
        <?php foreach( $images as $image_id ): ?>
            <li>
                <?php echo wp_get_attachment_image( $image_id, $size ); ?>
            </li>
        <?php endforeach; ?>
    </ul>
<?php endif; ?>
Source by www.advancedcustomfields.com #
 
PREVIOUS NEXT
Tagged: #acf #gallery
ADD COMMENT
Topic
Name
9+3 =