Get help. Give help. A Web Design and Development Community.
I’m trying to get the value from a custom field I have set up and insert that into NGG to pull the correct gallery.
Here is what I’m using:
< ?php $get_short_code = "[nggallery id=" . the_field('image_gallery') . "]";
echo do_shortcode($get_short_code); ?>
The result of that output is “19[Gallery Not Found]”.
19 is the correct value just doesn’t want to work dynamically with the field…. Is there some kind of trick with do_shortcode + ACF fields?
Any help would be greatly appreciated as I’m very much a failure at PHP currently.
You must be logged in to reply to this topic.