Guys I have a question I hope You can help:
I'm using append to content in TDO mini form plugin with the code from (MEMBER: crazywp) that displays all the images from every post. I would like to modify it but I am poor in php to make the code grab only the attachments from the post the submitter has published, and not every attachment from every post in the blog:
Thank You in advance :)
current code:
<?php
$attachments = get_children( array('post_parent' => get_the_ID(), 'post_type' => 'attachment', 'post_mime_type' => 'image') );
foreach ( $attachments as $attachment_id => $attachment ) {
echo '<div style="float:left;margin:0px 5px 0px 0px;background:#eeeeee;border:1px solid #bbb;padding:5px;" >';
echo ' ' . wp_get_attachment_link( $attachment_id ) . '';
echo '</div>';
} ?>














