I found the solution from elsewhere on the Forums. I’ll probably look into the Gallery short code later. Here’s the solution – with simple html markup added (list for an example):
<ul>
<?php
$args = array(
'post_type' => 'attachment',
'numberposts' => -1,
'post_status' => null,
'post_parent' => null, // any parent
);
$attachments = get_posts($args);
if ($attachments) {
foreach ($attachments as $post) {
echo '<li>';
setup_postdata($post);
the_attachment_link($post->ID, false);
the_excerpt();
echo '</li>';
}
}
?>
</ul>