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 ?

  • 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. Mar 5, 2012 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? Mar 5, 2012 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.
    – KodeFor.Me
    Mar 5, 2012 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.
    – KodeFor.Me
    Mar 5, 2012 at 22:00

1 Answer 1


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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