Support

Account

Home Forums Add-ons Gallery Field Include additional custom fields in returned gallery array

Unread

Include additional custom fields in returned gallery array

  • 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)

The topic ‘Include additional custom fields in returned gallery array’ is closed to new replies.