• Hi
    I’m uploding images with IPTC metadata.
    The IPTC description fills the caption filed in the wordpress.
    How can I change to:
    IPTC title = wordpress title+caption.
    IPTC description = wordpress discription+alt.
    I’ve been searching for solution but couldn’t find one.
    Please help me with that. I have about 6’000 images I need to upload.
    I’m using ACDsee software to enter metadata if it helps.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    If your intention is to take WP data and apply it permanently to the image’s embedded IPTC data, I’m unaware of such a plugin. Coding one’s own plugin is a possibility if you have the requisite skills. If you did have such skills, I don’t think you would be asking about it here, so I guess that’s not an option 🙂

    What is possible is to display WP meta data as the caption in place of using the IPTC data. The end result will appear the same on your site, the difference is the image’s IPTC data is not changed. What’s required to do this is mainly altering the template or shortcode that displays images with captions. You are still looking at some custom coding for this, but it’s much more accessible than code that alters embedded IPTC data.

    Thread Starter meravjon

    (@meravjon)

    I found out that if I change wp-admin\includes\media.php to:

    $attachment = array_merge( array(
    		'post_mime_type' => $type,
    		'guid' => $url,
    		'post_parent' => $post_id,
    		'post_title' => $title,
    		'post_content' => $excerpt,
    		'post_excerpt' => $excerpt,
    	), $post_data );

    I get the description IPTC to the description field in woordpress.
    however I don’t want to change this file I’m looking for a hook that can make it throw functions.php

    Moderator bcworkz

    (@bcworkz)

    A hook to alter what exactly? The caption output? If so, it depends on how your theme manages captions. If it is by the [caption] shortcode, you can hook ‘img_caption_shortcode’ to change the caption to anything you want. This bypasses the normal caption processing, it’s up to you to construct the complete output. Your callback is passed the shortcode attributes and the img element for possible use in the construction.

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

The topic ‘caption to description + alt’ is closed to new replies.