I have configured ACF to appear in a fancybox. The fields are being pulled in (as I can see the hardcoded header information), but nothing from the ACF appears. I have linked it to call an ID, which is then associated with the section that should be displayed when clicked.
My expectation is that clicking on the image will open the fancybox and show the ACF image and content. Instead, I only see the header fields with no ACF content.
I attempted removing the display none from the class.
Trying hard-coding a basic anchor tag linking to a paragraph seemed to work fine, but as soon as I include ACF information, it malfunctions.
Even when I removed all PHP and manually coded an image and content, it worked perfectly. It simply does not respond well to the PHP code calling my ACF.
<a href="#popup" data-fancybox>
<img class="image" src="<?php the_field('project_image', get_the_ID()); ?>" />
</a>
<section id="popup">
<img src="<?php the_field('project_image', get_the_ID()); ?>">
<h3>About</h3>
<p><?php echo $about_content;?></p>
<hr class="hr-left">
<h3>Features</h3>
<p><?php echo $features_content; ?></p>
<a class="btn secondary-btn" href="<?php echo $code_reference_url; ?>"><?php echo $button_text; ?></a>
</section>
Upon clicking the image, a fancybox should appear with the content from the "popup" division. However, currently, the lightbox opens but displays empty fields.