Hi,
I’m having trouble integrating a media attachments selector field with the gallery field.
This is what I have so far:
<?php $images = get_field('project_content'); if( $images ): ?>
<?php foreach( $images as $image ): ?>
<div class="<?php $columns = get_field('columns', $image['id']); ?>">
<a class="fancybox" rel="group1" href="<?php echo $image['url']; ?>"><img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>"/></a>
<h5><?php echo $image['caption']; ?></h5>
</div>
<?php endforeach; ?>
<?php endif; ?>
Gallery being ‘project_content’, and ‘columns’ the selector in attachments. Right now the gallery works fine, but the selector doesn’t produce any results.
Any help figuring this out would be greatly appreciated!