Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

How to get a value of a field set with Media Custom Fields (programmatically)?

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

As taken from :

http://wordpress.org/extend/plugins/media-custom-fields/faq/

How does this plugin handle my data?

Media items are stored in WordPress just like regular posts. This enables us to use native WordPress functions to store and retrieve your custom fields. Due to this, your data is stored in a very future-proof way, in the postmeta table of the WordPress database.

So you would do it the same way you would do it for a post or page using get_post_meta, but you would pass the media attachment ID in as the post ID

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.