From http://www.wprecipes.com/how-to-show-wordpress-post-attachments