I want to create a custom page that will display let's say 20 latest galleries / page - but only the first image from the gallery, not all of them. something like this: <http://www.autoblog.it/gallerie/>

I've done this:

```
<?php
$args = array(
'post_type' => 'attachment',
'posts_per_page' => 10,
'post_parent' => $postid,
'numberposts' => 1,
'paged' => $paged,
);
$attachments = get_posts($args);
if ($attachments) {
foreach ($attachments as $attachment) {
    echo the_attachment_link($attachment->ID, false, false, true )
    echo get_the_title();   }
}?>

```

it works but what it does is to display latest 10 images, not latest 10 galleries, so first image from each gallery.

Please help

Thank you