What's the best way to handle post images in a template
-
Here’s my predicament: on my main page I want to display an image at 400 width and a description of the image for each post. And on the single post page I want to display the same image at 640 width along with the same description.
Problem is I want the image and the description to be separate, i.e. not all in the_content(). And also getting those widths correct on both the main and single pages using a single image.
What would be the best way to handle this? My only ideas are to attach an image with each post, and put the description into the body of the post (the_content()). Or an easier option would be to post the image into the body and use the excerpt (the_excerpt) for the description, but I’m not sure if this is the best way to go about it.
I also want to avoid using plug-ins.
- The topic ‘What's the best way to handle post images in a template’ is closed to new replies.