Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $attachments = get_children( array('post_parent' => get_the_ID(), 'post_type' => 'attachment', 'post_mime_type' => 'image') );
- foreach ( $attachments as $attachment_id => $attachment ) {
- echo '<ol class="related-posts">';
- echo ' ' . wp_get_attachment_link( $attachment_id ) . '';
- echo '</ol>';
- } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement