SHARE
TWEET

Untitled

a guest Aug 9th, 2010 109 Never
  1. <?php
  2. $attachments = get_children( array('post_parent' => get_the_ID(), 'post_type' => 'attachment', 'post_mime_type' => 'image') );
  3. foreach ( $attachments as $attachment_id => $attachment ) {
  4.         echo '<ol class="related-posts">';
  5.         echo ' ' . wp_get_attachment_link( $attachment_id ) . '';
  6.                         echo '</ol>';
  7. } ?>
RAW Paste Data
Top