Support » Plugin: FooBox Image Lightbox WordPress Plugin » Including custom fields in captions

  • Resolved rignano

    (@rignano)


    I have used Advanced Custom Fields plugin to add custom fields to my image media attachments. The fields I have added are
    image-location: Where photograph was taken (text field)
    image-date: Date photograph was taken (text field)

    I would like these fields to display in my foogallery/foobox captions (additional to the title and description that area already displayed).

    I assume I need to edit the foogallery theme files so that these new fields are pulled in along with the title/description. These can then be passed on to the foobox lightbox. I am not sure how to do this and just wondered if anyone had any pointers?

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author bradvin

    (@bradvin)

    hi @rignano

    I think this will be possible with a bit of code. You should not have to edit the gallery template files, but rather hook into foogallery_build_attachment_html_caption filter

    I will put some documentation together for this filter and post it here when it is done. I will use ACF to match you scenario

    I found the code for the custom caption plugin on GitHub. I was able to just add the ACF fields into that and worked fine.

    Many thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.