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 want to allow contributors to upload images while creating posts. But the catch is, I am building the post display pages out of my own custom PHP.

Every article written will follow the same template:


Is there a way to allow them to upload an image in the default post editor, and to be able to access that somewhere with PHP, and display that in the 'ImageOfArticle'?

share|improve this question

There is the built in post thumbnail. Wordpress will keep track of it and you can use the_post_thumbnail to display wherever needed.

share|improve this answer
This is a much better solution than what I had. however, I kinda want to have two images, is there any functionality here? – Adola Jul 19 '12 at 3:47
By two images do you mean that you want two images specific to each post or the thumbnail and the author avatar? – fdsa Jul 19 '12 at 22:05
As in, assume an array of thumbnails. that way I can access different thumbnails. thumbs[0], thumbs[1] etc. – Adola Jul 20 '12 at 6:45
I would look into custom fields. You could store the address of each additional image in the custom field. – fdsa Jul 20 '12 at 17:23

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.