画像の添付ファイルIDを知っていると仮定して、添付されている投稿のパーマリンクを取得するにはどうすればよいですか(もしあれば)。
大体これ:
$parent = get_post_field( 'post_parent', $id); $link = get_permalink($parent);