Support » Plugins » Use image descriptions as automatic captions in WP 2.5

  • I am currently building a replacement site for our student newspaper. We’re using a Premium News Theme, which has worked out great for us, but we also need automatic image captions.

    I’ve already found a caption plugin that pulls the data from the caption field in the media uploader dialog, however I recently discovered that WordPress 2.5 will auto embed EXIF data and insert it in the description field, rather than the caption field.

    Does anyone know how to program the posts to place this info as a caption instead of using either the title field or caption (alt) field? I figured I can probably modify the caption plugin to pull the text from there, but I don’t know how to code it in PHP. As far as I can tell it involves some $attachment->post_content; or something similar. It looks like this person was on the right track, but I need it embedded within the post itself:

    I’ll be happy to provide more information if I didn’t make it clear enough.

    We’re very exciting about using WordPress, and thanks for the help!

Viewing 1 replies (of 1 total)
  • Hi, If you haven’t figured it out yet here is what to do:
    open /wp-admin/includes/media.php
    ‘post_excerpt’ => array(
    ‘label’ => __(‘Caption’),
    ‘value’ => $edit_post->post_excerpt,

    ‘post_excerpt’ => array(
    ‘label’ => __(‘Caption’),
    ‘value’ => $edit_post->post_content,

    The change is on line 948 in wordpress 2.7, not sure about 2.5, but it should be near there.

    If you get some time I’d love to pick your brain about wordpress any how it has been working for your school.

Viewing 1 replies (of 1 total)
  • The topic ‘Use image descriptions as automatic captions in WP 2.5’ is closed to new replies.