I am building a photo site with WP and homepage is a custom page with embedded gallery. When someone clicks a image, he is taken to the attachment page.
The problem starts here. I want the image on attachment page to link to a custom URL but there is no way of changing it. I even tried adding a tag using a conditional tag( is_attachment() ) but since WP puts another a automatically before image, this is not working. So, is there any way to change link or at least disable it?