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


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

  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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