
Fields. gallery (Gallery, return format Image ID).
<?php $images = ugly_get( 'gallery' ); ?>
<?php if ( $images ) : ?>
<ul class="gallery">
<?php foreach ( $images as $id ) : ?>
<li>
<a href="<?php echo esc_url( wp_get_attachment_image_url( $id, 'full' ) ); ?>">
<?php echo wp_get_attachment_image( $id, 'medium' ); ?>
</a>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>The order is the one the editor dragged them into.