Attachment Page

Hello, how do I go about editing the attachment.php file to remove all comment fields etc i.e. all I want is blank page.



Dear Lawrence,

I’d like to suggest you do this by using jQuery approach instead of PHP, as it is much simpler.

  1. Install and activate the TC Custom JavaScript plugin
  2. Go To Appearance > Custom JavaScript
  3. Paste the following code into the provided box

    "use strict"

    if( $('body').hasClass('attachment') ){

      // Remove comment section


  1. Update


Kharis, we have done this dance already and you were supposed to get back to me. I don’t have any option but edit the php as you were no able to provide a solution that was repeatable across two site…remember!!

…so? any update?

Hello there,

I would like to apologize in advance for the delay.

Please try this solution.