I have a custom field in my Attachment form for WordPress.
I am storing values in this & would now like to display the value at the public end.
Going by this http://codex.wordpress.org/Function_Reference/wp_get_attachment_metadata, this should help, but doesn’t:
<?php wp_get_attachment_metadata( $attachment_id, $unfiltered ); ?>
Can someone please assist?
Thank you
wp_get_attachment_metadata result is:
So, this is attachment datails. But you want get custom fields. You can use same as post:
all of which avaible in attachment.php. In attachment page, $post is attachment post, so not parent post.