I use this one to out put all the attachment that are attached to the page.
<?php
$args = array(
'order' => 'ASC',
'post_type' => 'attachment',
'post_parent' => $post->ID,
'post_mime_type' => 'image',
'post_status' => null,
'numberposts' => -1,
);
$attachments = get_posts($args);
if ($attachments) {
foreach ($attachments as $attachment) {
echo wp_get_attachment_link($attachment->ID, 'thumbnail', true, true);
}
}
?>
I can set the order as ASC or DESC but I would like it to be as the attachments are arranged in the Ad Image Gallery view. Sometimes it comes handy to reorder the images a bit.
All help appreciated! Thanks.