添付ファイルの URL を取得しようとしてきましたが、これまでのところ、このコードは画像への直接リンクを取得しています。
<?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>';
}
?>
代わりに、添付ファイルの URL が必要です。助けてください...