Does anyone know if its possible to get the title, caption and link from a image attached with the wordpress media uploader.
i.e from here: http://en.blog.files.wordpress.com/2008/12/picture-13.png
This gets the attachement URL and echos it
echo wp_get_attachment_url(postID here);
This link has loads of info on the subject.
thanks for the link,I seen it before but could not find what I was after. I am able to grab the first image attached to a post, but not its properties.
Look at the end of the post:
$attimg = wp_get_attachment_image($image->ID,$size); $atturl = wp_get_attachment_url($image->ID); $attlink = get_attachment_link($image->ID); $postlink = get_permalink($image->post_parent); $atttitle = apply_filters('the_title',$image->post_title);
$atttitle is the image title.