Home Forums Backend Issues (wp-admin) Adding custom meta fields to an image field


Adding custom meta fields to an image field

  • Hey,

    I’m looking to hook into the ACF Image field in order to add a custom select box that holds a few values. I want it to save next to i.e. alt, description, etc.

    I can’t really find what method to use in order to successfully hook into the field. I would really appreciate it if someone could tell me what hook to use.


  • Is the field group location rules set to show on attachments or somewhere else?

    Before you can update fields on attachment you need to create a field group that adds them there.

    Then, where is the update happening? When you edit the image or when you edit some other post? I’m assuming that it’s when editing another post. In this case you would use an acf/save_post action and in this action you would update the fields attached to the image after getting the attachment ID you want to update.

  • Thanks for your reply John.

    Before saving I first need to succeed in adding a field here. I cannot seem to find the correct action that adds this field in the first place. Maybe you could help me finding out where to add the field?

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

The topic ‘Adding custom meta fields to an image field’ is closed to new replies.