Support

Account

Home Forums General Issues ACF Gallery | Different captions for the same image over galleries

Solving

ACF Gallery | Different captions for the same image over galleries

  • Hi there,

    I’m planning using the same image in differents galleries, with different captions. However, the WordPress images fields (caption, title, description…) will be always the same for a given image.

    Is it possible to set a custom field for images that can store a unique value over different posts?

    I also saw this topic with the same question.

    The author found his way with the repeater field, but I do need a gallery field, as it has the grid layout and the option to add multiple images at once.

  • A thought that popped to mind is to have a repeater attached to the Image itself… with sub fields of type: Post Object and Text

    Then… when you add/edit an image from within the WordPress Media Library, you can create a new repeater row for each Post that you are attaching the image to.

    Then… you will always know the Image ID, for which you can look up the Post ID (from the repeater), for which you can look up the custom caption.

    Let me know if that seems like a reasonable solution, and if you need further guidance.

    Keith

  • Hey Keith, thanks for the insight. I ended up with a similar aproach, using repeater fields.

    First I css-numbered the gallery images. Then I created a repeater in the post (not in the image) for the captions. Each repeater field will be the corresponding image caption.

    It’s still not the best solution, as the user will have to change a different set of fields for gallery images, but considering how WordPress works, this at least get the job done.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.