I bought pro version today and i need some help with Gallery.
I use the next code for show it but don’t show any image of post.
<?php $images = get_field('gallery'); if( $images ): ?> <ul> <?php foreach( $images as $image ): ?> <li> <a href="<?php echo $image['url']; ?>"> <img src="<?php echo $image['sizes']['thumbnail']; ?>" alt="<?php echo $image['alt']; ?>" /> </a> <?php echo $image['caption']; ?> </li> <?php endforeach; ?> </ul> <?php endif; ?>
I need some help please. Thanks
Can you confirm the custom field you have created has a name of
gallery? This is most likely the issue.
Please debug your data: http://www.advancedcustomfields.com/resources/how-to/debug/
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2022 Advanced Custom Fields.