Title: How do we remove comments
Last modified: August 18, 2016

---

# How do we remove comments

 *  [thierrymartin](https://wordpress.org/support/users/thierrymartin/)
 * (@thierrymartin)
 * [21 years, 4 months ago](https://wordpress.org/support/topic/how-do-we-remove-comments/)
 * Is there a safe and elegant way to remove all trackback and comments links and
   references – when I try to remove specific lines it causes parsing errors.

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [tcloer](https://wordpress.org/support/users/tcloer/)
 * (@tcloer)
 * [21 years, 4 months ago](https://wordpress.org/support/topic/how-do-we-remove-comments/#post-133784)
 * You can swith off comments and trackbacks under Options >> Discussion. This only
   affects new posts, though.
 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [21 years, 4 months ago](https://wordpress.org/support/topic/how-do-we-remove-comments/#post-133786)
 * Which version of wp ?
 *  Thread Starter [thierrymartin](https://wordpress.org/support/users/thierrymartin/)
 * (@thierrymartin)
 * [21 years, 4 months ago](https://wordpress.org/support/topic/how-do-we-remove-comments/#post-133796)
 * 1.5 beta – I want to remove even the references like “no comments” at or “comments
   closed” from the bottom of pages.
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [21 years, 4 months ago](https://wordpress.org/support/topic/how-do-we-remove-comments/#post-133825)
 * To stop comments and trackbacks, delete the wp-comments-post.php and wp-trackback.
   php files. To delete the references to them on the main pages, look for the values
   like “no comments” or “comments closed” in index.php and delete them.
 *  [hooopla](https://wordpress.org/support/users/hooopla/)
 * (@hooopla)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/how-do-we-remove-comments/#post-134664)
 * > To stop comments and trackbacks, delete the wp-comments-post.php and wp-trackback.
   > php files. To delete the references to them on the main pages, look for the
   > values like “no comments” or “comments closed” in index.php and delete them.
 * Is this still considered the best approach for 1.5 final?
 *  [jefwhite](https://wordpress.org/support/users/jefwhite/)
 * (@jefwhite)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/how-do-we-remove-comments/#post-134669)
 * I’m not at 1.5 yet, but I found that if I set “use_trackback” and “use_pingback”
   values in the “options” table to “0”, those options disappear in the “writing”
   pane.
 *  [jaymoon](https://wordpress.org/support/users/jaymoon/)
 * (@jaymoon)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/how-do-we-remove-comments/#post-134706)
 * After hours of searching, and help from my buddy, we discovered that there’s 
   a line of code in the index.php file located in the dir of the theme you are 
   currently using.
 * I’m assuming you mean the part where it says “Posted in (category) | Edit | Comments
   disabled”
 *  [emt036](https://wordpress.org/support/users/emt036/)
 * (@emt036)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/how-do-we-remove-comments/#post-134707)
 * (Assuming you are working with the default theme:)
 * Delete wp-comments-post.php and wp-trackback.php in your root directory, and 
   then delete comments.php and comments-popup.php in your theme directory.
 * Then, in the index.php in your theme directory delete:
 * `<?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?
   >`
 * In the single.php of your theme directory, delete:
 * `<?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)){//
   Both Comments and Pings are open ?>
    You can <a href="#respond">leave a response
   </a>, or <a href="<?php trackback_url(display); ?>">trackback</a> from your own
   site.
 * `<?php } elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)){
   //
   Only Pings are Open ?> Responses are currently closed, but you can <a href="<?
   php trackback_url(display); ?> ">trackback</a> from your own site.
 * `<?php } elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)){
   //
   Comments are open, Pings are not ?> You can skip to the end and leave a response.
   Pinging is currently not allowed.
 * `<?php } elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)){
   //
   Neither Comments, nor Pings are open ?> Both comments and pings are currently
   closed.
 * Also delete:
    `<?php comments_template(); ?>`
 * That should be it.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘How do we remove comments’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 8 replies
 * 8 participants
 * Last reply from: [emt036](https://wordpress.org/support/users/emt036/)
 * Last activity: [20 years, 11 months ago](https://wordpress.org/support/topic/how-do-we-remove-comments/#post-134707)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
