[wp-trac] [WordPress Trac] #11896: wp_get_attachment_metadata not grabbing some metadata

WordPress Trac wp-trac at lists.automattic.com
Fri Jan 15 07:18:26 UTC 2010

#11896: wp_get_attachment_metadata not grabbing some metadata
 Reporter:  danielpataki                |        Owner:         
     Type:  defect (bug)                |       Status:  closed 
 Priority:  normal                      |    Milestone:         
Component:  General                     |      Version:  2.9.1  
 Severity:  normal                      |   Resolution:  invalid
 Keywords:  wp_get_attachment_metadata  |  
Changes (by dd32):

  * status:  new => closed
  * resolution:  => invalid
  * milestone:  Unassigned =>


 Yes, The metadata function returns the image Metadata.

 The Metadata is not the Caption/Description/Title data which has been
 entered, Think of the metadata as the custom fields of attachments, Its
 all the data that needs to be stored about attachments under the hood.

 You can access the data you expect through the normal template tags, such
 as get_the_title(), the_content() and the_Excerpt() i'm pretty sure.

 To check which is which, you can dump out the post object for the
 $attachment = get_post( $attachment_id );
 Then use the normal post template tags to retrieve the contents from the
 fields you want from there.

 If you need some help on how to use those functions, i'd suggest the wp-
 hackers mailing list or the support forums as that is not what trac is

Ticket URL: <http://core.trac.wordpress.org/ticket/11896#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list