Does anyone can share a code snippet, how to get first attached image path inside of the loop in index.php?
Thanks for a quick reply. However I’m having problems
$images =& get_children( ‘post_parent=’.$post->ID.’&post_type=attachment&post_mime_type=image’ ); print_r($images);
It seems that it doesn’t populate an array… really strange
Take a look at Jeff Starr’s post on displaying Image Attachments:
Take a look at WordPress for Designers Day 17, we deal with using attachments within the loop and how to display them.
- Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
- Open a support ticket if you would like specific help with your account, deposits or purchases.
- Item Support by authors is optional and may vary. Please see the Support tab on each item page.
Most of all, enjoy your time here. Thank you for being a valued Envato community member.