Home › Forums › ACF PRO › Boolean field for double-width Masonry item › Reply To: Boolean field for double-width Masonry item
You are using get_field and you should be using get_sub_field
<?php if ( get_sub_field('prod_gallery_wide_image') ): ?>
<div class="gallery-grid-item-width2">
<img src="<?php the_sub_field('prod_gallery_item');?>" />
</div>
<?php else: ?>
<div class="gallery-grid-item">
<img src="<?php the_sub_field('prod_gallery_item');?>" />
</div>
<?php endif; ?>
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.