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 create a custom post type with meta boxes.

In metaboxes I have create some fealds that the use can use the WordPress ThickBox Media Dialog to upload his/her images for each post seperatly.

From the other side, the WordPress, when I upload an image as a Featured image, gives me some functions like the

the_post_thumbnail()

that allowing me to choose the image size that I need in my template.

So, the question is, can I use any function looks like the above one to print out the image sizes I like, that the end user has upload through the media box custom fields ?

share|improve this question
1  
If those attachments are easily identifiable in some way you could copy the_post_thumbnail() function and change its name and the image it gets. –  sanchothefat Mar 5 '12 at 14:35
1  
What do you mean by "custom implementation of thickbox"? And to cut to the chase: are the images being uploaded as attachment post-types, or as custom post meta, or as something else? –  Chip Bennett Mar 5 '12 at 15:04
    
The images are uploaded as custom post meta. More specific, the images are uploaded as URL in post meta table. Is there a way to upload the imasges as attachment through a meta box ? With custom imlementation I mean, that the end user can click on a button into my metabox and then the default WordPress Media Manager will appear into the Thickbox. –  Merianos Nikos Mar 5 '12 at 15:19
    
Is there any way to get the image ID ? In that case I will modify my script, in order to work with the default way that WordPress works. –  Merianos Nikos Mar 5 '12 at 22:00

1 Answer 1

up vote 1 down vote accepted

If you're not opposed to using a plugin to achieve this, I would recommend the Multiple Post Thumbnails plugin. It's very simple to use and provides the same functionality as "the_post_thumbnail()" function.

share|improve this answer

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.