Support » Plugins » Hacks » Extract image IPTC metadata to custom field value

  • I need a way to publish new posts on wordpress with custom field keys and values based on image IPTC metadata. I am using the Yet Another Photo Blog (YAPB) plugin in combination with a bulk upload extension in order to upload multiple images at once and automatically publish them each as separate posts in WordPress. The plugin extracts IPTC metadata from the images and uses these values to fill in post titles, descriptions, and tags. I need to modify this code to also update the posts’ custom fields.

    As far as I can tell, this is the part of the code that needs modification:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    The function “add_post_meta” adds a custom field key, but I cant seem to pull the value from the IPTC metadata. The code works if I define a static value, i.e. $value_1 =99; but does not work when I try to define the variable based on the IPTC. Do I just have basic php syntax issues? I am not very experienced with php. I would be extremely grateful if anyone can help me find a solution.


  • The topic ‘Extract image IPTC metadata to custom field value’ is closed to new replies.