php - Get Attachment Custom Field value -


I have a custom field in my attachment form for WordPress.

I have this Android; Now the public would like to display values ​​at the end.

By visiting this, it should help, but not: & lt ;? Php wp_get_attachment_metadata ($ attachment_id, $ unfiltered);

array ([width] = & gt; [height] = Array ([Array ([file] => [width] = & gt; array ([file] = & gt; [width] = & gt; [file] = & gt; [size] => Gt; [height] => [mime-type] = & gt;] = & gt; [height] => [mum-type] => 2) [image_meta] => array [Aperture] = & gt; [credit] => [camera] = & gt; [caption] = & gt; [created_timestamp] => [copyright] => [focus_length] => [ Iso = => [shutter-speed] => [title] => gt;))

So, this attachment is datails but you want to get custom field You can use the same as the post:

  get_post_meta ($ post-> id, 'your_field_name', true);  

All of whom are avaible in attachment.php, in the attachment page, $ post is attachment post, so there is no parent post.


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -