djspark
Member
Posted 3 years ago #
I could not find anywhere on support/codex:
Is there a way from the single post template to know wich image(s) are attached to the post ?
I saw on the attachment subpost, it refers to '$post->parent_post' , but from the post, could not find any reference to the attachments...
any ideas ?
Lunapapa
Member
Posted 3 years ago #
This post might help you get rid of your problem :
http://wordpress.org/support/topic/39478?replies=6
djspark
Member
Posted 3 years ago #
That solution implies I create a custom field for it (no prob if there's no other way), but since you can attach an image/video/whatever to the post with the inline upload tool, why would I use another way ?
Lunapapa
Member
Posted 3 years ago #
So warn me whenever you get the answer. I spent a couple of hours to find an elegant solution to this problem. There's also the alternative to grab the image tag from the DOM. That's not elegant either.