WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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


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
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
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
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


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.