@marcus972:
Hi, I recently implemented your hack, and yes it works as expected.
There’s one thing though, it also include attachments that are attached to posts with “draft” or “future” status.
And they would be listed as:
http://www.mydomain.com/?attachment_id=123456
Can you please help and tweak the hack a bit more to include attachments that are attached to published posts only?
Thank you so much.