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.

Already searched on here and couldn't find question so forgive me if it's been asked. I'm trying to use dynamic images on a homepage so my client can maintain the images. I've seen tutorials where one person uses post_thumbnails while another uses custom fields. Do I need to create a post for each image and display post_thumbnail on homepage? Or is it better to use custom fields for one post to display multiple images?

Reference:

the_post_thumbnail() http://ontwik.com/wordpress/creating-a-wordpress-theme-part-1/

get_post_custom() http://ontwik.com/web-design/how-to-design-a-portfolio-site-part-2/

similar question

share|improve this question
    
Are you setting a static page as the homepage? –  Rutwick Gangurde Dec 26 '11 at 15:28
    
Yes, I made a custom home.php for homepage. Homepage shows different products they carry. –  Danger14 Dec 26 '11 at 17:34
    
If Products are custom posts, then post thumbnails will be a better option, but it means only one image per post. If your client is adding/editing the products via the visual editor, then he can upload the images in the media library and use the image urls wherever he wants the images. –  Rutwick Gangurde Dec 26 '11 at 18:18
    
Thanks Rutwick. I wish I could give you best answer. –  Danger14 Dec 31 '11 at 0:49
    
You're welcome... no problem, I'm glad I could help a bit! –  Rutwick Gangurde Dec 31 '11 at 9:33

2 Answers 2

up vote 0 down vote accepted

If your page is a portfolio index, where each image is meant to relate to a post or page, then post thumbnails would be the way to go.

If your page is simply a gallery page, and the images don't relate to any content beyond that page, then the best method would be to upload images as attachments to that page and output them in your template with get_posts.

share|improve this answer
    
Thanks for the help. Let me do some research and talking to client. –  Danger14 Dec 27 '11 at 5:04

better is the_post_thumbnail();

custom fields were used while thumbnail feature was not introduced.

share|improve this answer
    
Thanks for the help. Let me do some research and talking to client. –  Danger14 Dec 27 '11 at 5:03

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.