What’s the best way to associate an image with a post in WordPress?
What I mean by that is when each post has a ‘header’ image which is not in the body of the post. You’d most likely use it to show a small image next to each post when they’re listed somewhere.
I know you can use custom fields with posts, but are there any better ways of doing it?
Thanks in advance.
If you go the custom field route – in your template code you can save the value of the custom field to a variable and then echo it out to your image.
The function the_content() may or may not be what you will end up using – for more control, you can try setting a new WP_Query() and then revamping the loop.