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

ImageOfArticle
UserAvitar
Name
Content
Footer

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

1 Answer

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

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.