Howdy! I'm searching for a method to list all the image files inside a posts' media library.

The reason with this is that if personal files continues to be submitted while creating or editing a publish, may be the file connected using the publish in some manner, and may I create a listing out of this data.

I believe the next_image_link() / previous_image_link() template tag is really as close as I've discovered.

I believe that this ought to be close:

$query = 'SELECT * FROM `wp_posts`

WHERE `post_parent` = ''.$_GET['post_id'].''

AND  `post_mime_type` = 'image/jpeg'

ORDER BY `menu_order` ASC'

thanks.

Every image you submitted to specific publish is known as attachment, in wordpress terminology. To list out all attachment, you should use get_children() function:

$images =&lifier get_children( 'post_type=attachment&post_mime_type=image&post_parent=10' )

$counter=

foreach( (array) $images as $attachment_id => $attachment )

wordpress_get_attachment_link( $attachment_id ) . "'>image $counter</a><br />"



The formula is something of that nature.