Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 9th, 2010  |  syntax: None  |  size: 0.31 KB  |  hits: 78  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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. } ?>