i've been trying to get the attachment URL on single.php, so far this code gets the DIRECT LINK to the image;
<?php
if ( $attachments = get_children( array(
'post_type' => 'attachment',
'post_mime_type'=>'image',
'numberposts' => 1,
'post_status' => null,
'post_parent' => $post->ID
)));
foreach ($attachments as $attachment) {
echo '<a target="_blank" href="' . wp_get_attachment_url( $attachment->ID ) . '">Download Full Size</a>';
}
?>
but instead i want the attachment URL, PLEASE HELP!
get_permalink( $attachment->ID ) )
?