Support » Fixing WordPress » Disabling comments on media attached to post

  • Hi,

    I have started a blog here:

    Each thread has a comment box at the end, which I want to keep.

    In most posts, I am including a PDF form inserted directly into the post. This works OK, however when visitors click on this link, it opens another page with the link repeated and another comments box.

    The visitor can click this second link, which opens the file for them – all OK. But if a user inputs a comment here, it isn’t reflected in the main thread.

    So basically I like having the comments box at the end of the thread, but I want to disable the comment box on pages that open with media linked to the thread.

    Hope that is clear. Thanks in advance,


Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Ipstenu (Mika Epstein)


    🏳️‍🌈 Halfelf Rogue & Plugin Review Team Rep

    Why not link to the PDF directly and not the media page?

    Alternately, you could copy your single.php file, name the new file attachment.php and remove the call to comments at the bottom.


    Thank you very much.

    I now see that I was attaching/uploading the files incorrectly. I have taken out all of the previous links and inserted new hyperlinks to the file URL.

    Thanks for you help,


    Even if you link differently, the attachment page exists and can be found by spam bots, so the problem and question remains: How do you universally disable comments for media pages? Almost never would anyone want comments on those attachment pages, so they should be disabled for default – or at least have a very clear and easy to use option that allowed for disabling them altogether.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Disabling comments on media attached to post’ is closed to new replies.