I have a few custom fields assigned to attachments. Its easy enough to grab them within the gallery by using get_field(‘custom_field’, $image[‘ID’]) within each $image in the gallery. However this has to make a lot of extra database calls. Is there a good way to just have custom attachment fields return as part of the gallery array?
Viewing 1 post (of 1 total)
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