Can you elaborate a little on what you mean by ATTACHED and not hyperlinked? I’m trying to achieve the same thing here, using slightly different code:
<div class="flexslider">
<ul class="slides">
<?php
$attachments = get_attached_media( 'image', 36 );
foreach($attachments as $attachment) {
$img = wp_get_attachment_image_src($attachment->ID, 'medium');
if($img !== false) {
?>
<li><img src="<?php echo $img[0]; ?>" /></li>
<?php
}
}
?>
</ul>
</div>
However, the images do not show up in the browser, although they DO show up in the source code, strangely. I am testing locally, using MAMP, and that could present an issue on why they’re not showing up.