va_get_post_attachments( $post_id, $how_many = -1, $type = VA_ATTACHMENT_GALLERY, $fields = '' )
Queries the database for attachments from custom fields or gallery Uses the meta key ‘_va_attachment_type’ to filter the available attachment types: gallery | file