Home › Forums › Front-end Issues › LightBox images in custom content field › Reply To: LightBox images in custom content field
Hi @flowbob
It is most likely that you have a plugin which is adding the lightbox effect to WYSIWYG galleries. Is this correct?
if so, all you will need to do is pass the ACF value through the the_content
filter – this is how a plugin would modify the_content value.
<?php
$wysiwyg = get_field('field_name', false, false);
echo apply_filters('the_content', $wysiwyg);
?>
Please note the extra false, false
parameters are to prevent ACF from formatting the value because the_content
will also do this.
Thanks
E
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.