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.

I have added Custom Fields to the Media Uploader in WP3.5. I am unsure of how to have that data displayed on the Attachment page.

share|improve this question

1 Answer 1

There are a few different ways to get your values. One way is in the loop and another way is outside the loop. Here is a short code snippet that can be used to get them outside the loop

 ( untested )
 <?php 
   global $wp_query;
   $postid = $wp_query->post->ID;
   echo get_post_meta($postid, 'customField', true);
?>

You will want to change the 'customField' in the last line above to the name of your custom field

You might also read up in the codex http://codex.wordpress.org/Custom_Fields

Here is another good source for you to look over http://vandelaydesign.com/blog/wordpress/custom-fields/

I would also try googling for some results on how to display them. There are tons of articles out there that will answer your question much faster than waiting for a response.

share|improve this answer
    
Thanks for your response Jamie –  vPolite Mar 6 '13 at 22:43

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.